{"openapi":"3.1.0","tags":[{"name":"Authentication"},{"name":"Lookup"},{"name":"Ingest"},{"name":"Tier1"},{"name":"Uploads"},{"name":"Orders"},{"name":"Integrations"},{"name":"OpenBase"}],"info":{"title":"core-server","description":"Partly Core Platform Server","version":"1.0.0"},"paths":{"/api/v1/analytics.events.insert":{"description":"Log a single analytics event","post":{"operationId":"analytics.events.insert","tags":["analytics"],"description":"Log a single analytics event","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics.AnalyticsEventsInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics.AnalyticsEventsInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics.AnalyticsEventsInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}},{"name":"origin","in":"header","required":true,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}},{"name":"referer","in":"header","required":true,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/assemblies.experimental.search":{"description":"Tier1.5 experimental endpoint.","post":{"operationId":"assemblies.experimental.search","tags":["tier1"],"description":"Tier1.5 experimental endpoint.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.ExperimentalSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.ExperimentalSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.ExperimentalSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/assemblies.subscribe.stream":{"description":"SSE stream emitting an event each time an assembly search completes. Proxies tier1-writer; `resume_point` is a Kafka offset, so reconnecting from a prior point replays from there.","post":{"operationId":"assemblies.subscribe.stream","tags":["tier1"],"description":"SSE stream emitting an event each time an assembly search completes. Proxies tier1-writer; `resume_point` is a Kafka offset, so reconnecting from a prior point replays from there.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesSubscribeRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/tier1.AssemblySubscribeEvent"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/assemblies.v4.search":{"description":"Endpoint for looking up assemblies based on provided HCA (Human Centric Assembly) IDs.","post":{"operationId":"assemblies.v4.search","tags":["tier1"],"description":"Endpoint for looking up assemblies based on provided HCA (Human Centric Assembly) IDs.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/assemblies.v4.updates.stream":{"description":"SSE stream for one vehicle: emits `changed` whenever its assemblies search has a new answer (the tree, then the enrichments), so a client waiting on `in_progress` can search again at once instead of after `retry_after`. Emits `heartbeat` every 30s.","post":{"operationId":"assemblies.v4.updates.stream","tags":["tier1"],"description":"SSE stream for one vehicle: emits `changed` whenever its assemblies search has a new answer (the tree, then the enrichments), so a client waiting on `in_progress` can search again at once instead of after `retry_after`. Emits `heartbeat` every 30s.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesUpdatesRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesUpdate"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AssembliesSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/async-imports.prepare":{"description":"Prepares a new job for ingesting sellables asynchronously.","post":{"operationId":"async-imports.prepare","tags":["Ingest"],"description":"Prepares a new job for ingesting sellables asynchronously.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.AsyncImportsPrepareRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.AsyncImportsPrepareResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.AsyncImportsPrepareError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.baselines.insert":{"description":"Append or supersede an effective-dated baseline revision with an audit record. Restricted to billing staff.","post":{"operationId":"billing.configuration.baselines.insert","tags":["Billing"],"description":"Append or supersede an effective-dated baseline revision with an audit record. Restricted to billing staff.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.BaselineWriteRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.BaselineDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.BaselineWriteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.history.get":{"description":"Get bounded revision history for billing configuration. Restricted to billing staff.","post":{"operationId":"billing.configuration.history.get","tags":["Billing"],"description":"Get bounded revision history for billing configuration. Restricted to billing staff.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationHistoryRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationHistoryResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationHistoryError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.preview.get":{"description":"Rate hypothetical samples against persisted configuration without writing. Fails closed on missing evidence. Restricted to billing staff.","post":{"operationId":"billing.configuration.preview.get","tags":["Billing"],"description":"Rate hypothetical samples against persisted configuration without writing. Fails closed on missing evidence. Restricted to billing staff.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationPreviewRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationPreviewResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationPreviewError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.pricing.insert":{"description":"Append or supersede an effective-dated pricing policy with an audit record. Restricted to billing staff.","post":{"operationId":"billing.configuration.pricing.insert","tags":["Billing"],"description":"Append or supersede an effective-dated pricing policy with an audit record. Restricted to billing staff.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PricingWriteRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PricingRevisionDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PricingWriteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.relationship-evidence.get":{"description":"Get a short-lived private download URL for relationship evidence. Staff only.","post":{"operationId":"billing.configuration.relationship-evidence.get","tags":["Billing"],"description":"Get a short-lived private download URL for relationship evidence. Staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceUrlRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.AttachmentUrlResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceUrlError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.relationship-evidence.insert":{"description":"Commit uploaded supporting evidence to one billing relationship. Staff only; this is not claim acceptance.","post":{"operationId":"billing.configuration.relationship-evidence.insert","tags":["Billing"],"description":"Commit uploaded supporting evidence to one billing relationship. Staff only; this is not claim acceptance.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.relationship-evidence.list":{"description":"List supporting evidence for one billing relationship. Staff only.","post":{"operationId":"billing.configuration.relationship-evidence.list","tags":["Billing"],"description":"List supporting evidence for one billing relationship. Staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidenceListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.relationship-evidence.prepare":{"description":"Prepare private PDF or image uploads as supporting evidence for one billing relationship. Staff only.","post":{"operationId":"billing.configuration.relationship-evidence.prepare","tags":["Billing"],"description":"Prepare private PDF or image uploads as supporting evidence for one billing relationship. Staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidencePrepareRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidencePrepareResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipEvidencePrepareError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.relationships.insert":{"description":"Register a canonical seller/buyer billing relationship idempotently. Restricted to billing staff.","post":{"operationId":"billing.configuration.relationships.insert","tags":["Billing"],"description":"Register a canonical seller/buyer billing relationship idempotently. Restricted to billing staff.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.relationships.list":{"description":"List seller/buyer billing relationships for a subscription. Restricted to billing staff.","post":{"operationId":"billing.configuration.relationships.list","tags":["Billing"],"description":"List seller/buyer billing relationships for a subscription. Restricted to billing staff.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.RelationshipDetail"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.RelationshipListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.configuration.resolve.get":{"description":"Resolve persisted classification, baseline and pricing for an event and period. Restricted to billing staff.","post":{"operationId":"billing.configuration.resolve.get","tags":["Billing"],"description":"Resolve persisted classification, baseline and pricing for an event and period. Restricted to billing staff.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationResolveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationResolveResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ConfigurationResolveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.credit-note-requests.insert":{"description":"Create a new credit note request","post":{"operationId":"billing.credit-note-requests.insert","tags":["Billing"],"description":"Create a new credit note request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestCreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.credit-note-requests.list":{"description":"List credit note requests with optional filters","post":{"operationId":"billing.credit-note-requests.list","tags":["Billing"],"description":"List credit note requests with optional filters","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.CreditNoteRequestDetail>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.CreditNoteRequestDetail"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.credit-note-requests.update":{"description":"Update a credit note request status or details","post":{"operationId":"billing.credit-note-requests.update","tags":["Billing"],"description":"Update a credit note request status or details","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CreditNoteRequestUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.currencies.list":{"description":"List all currencies","post":{"operationId":"billing.currencies.list","tags":["Billing"],"description":"List all currencies","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CurrencyListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.CurrencyListItem"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CurrencyListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.currency-exchange-rates.list":{"description":"List latest exchange rates for a target currency. Restricted to Partly Staff","post":{"operationId":"billing.currency-exchange-rates.list","tags":["Billing"],"description":"List latest exchange rates for a target currency. Restricted to Partly Staff","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CurrencyExchangeRateListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.CurrencyExchangeRateListItem"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CurrencyExchangeRateListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.attachments.get":{"description":"Get a presigned download URL for one billing customer attachment","post":{"operationId":"billing.customers.attachments.get","tags":["Billing"],"description":"Get a presigned download URL for one billing customer attachment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentUrlRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.AttachmentUrlResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentUrlError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.attachments.insert":{"description":"Commit uploaded private attachments to a billing customer","post":{"operationId":"billing.customers.attachments.insert","tags":["Billing"],"description":"Commit uploaded private attachments to a billing customer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.attachments.list":{"description":"List private attachments on a billing customer (is_internal visibility applied)","post":{"operationId":"billing.customers.attachments.list","tags":["Billing"],"description":"List private attachments on a billing customer (is_internal visibility applied)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.attachments.prepare":{"description":"Prepare private upload URLs for files attached to a billing customer","post":{"operationId":"billing.customers.attachments.prepare","tags":["Billing"],"description":"Prepare private upload URLs for files attached to a billing customer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsPrepareRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.AttachmentsPrepareResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentsPrepareError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.attachments.remove":{"description":"Remove a private attachment from a billing customer","post":{"operationId":"billing.customers.attachments.remove","tags":["Billing"],"description":"Remove a private attachment from a billing customer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerAttachmentRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.get":{"description":"Get detail on a billing customer","post":{"operationId":"billing.customers.get","tags":["Billing"],"description":"Get detail on a billing customer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.insert":{"description":"Create a billing customer from an existing organization/business","post":{"operationId":"billing.customers.insert","tags":["Billing"],"description":"Create a billing customer from an existing organization/business","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerCreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.list":{"description":"Lists billing customers","post":{"operationId":"billing.customers.list","tags":["Billing"],"description":"Lists billing customers","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.CustomerListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.CustomerListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.remove":{"description":"Remove a billing customer","post":{"operationId":"billing.customers.remove","tags":["Billing"],"description":"Remove a billing customer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.statement.get":{"description":"Customer account statement (dated activity ledger, balances, and aging) for a period","post":{"operationId":"billing.customers.statement.get","tags":["Billing"],"description":"Customer account statement (dated activity ledger, balances, and aging) for a period","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerStatementGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerStatementResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerStatementGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.customers.update":{"description":"Update a billing customer","post":{"operationId":"billing.customers.update","tags":["Billing"],"description":"Update a billing customer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.CustomerUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.entitlement-overrides.insert":{"description":"Upsert a manual entitlement override for an organization. Restricted to Partly Staff","post":{"operationId":"billing.entitlement-overrides.insert","tags":["Billing"],"description":"Upsert a manual entitlement override for an organization. Restricted to Partly Staff","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementOverridesInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementOverride"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementOverridesUpsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.entitlement-overrides.list":{"description":"List manual entitlement overrides for an organization. Restricted to Partly Staff","post":{"operationId":"billing.entitlement-overrides.list","tags":["Billing"],"description":"List manual entitlement overrides for an organization. Restricted to Partly Staff","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementOverridesListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.EntitlementOverride"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementOverridesListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.entitlement-overrides.remove":{"description":"Remove a manual entitlement override for an organization. Restricted to Partly Staff","post":{"operationId":"billing.entitlement-overrides.remove","tags":["Billing"],"description":"Remove a manual entitlement override for an organization. Restricted to Partly Staff","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementOverridesRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementOverridesRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.entitlements.insert":{"description":"Upserts an entitlement. Restricted to Partly Staff","post":{"operationId":"billing.entitlements.insert","tags":["Billing"],"description":"Upserts an entitlement. Restricted to Partly Staff","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementsInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.Entitlement"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementsUpsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.entitlements.list":{"description":"List all entitlements. Restricted to Partly Staff","post":{"operationId":"billing.entitlements.list","tags":["Billing"],"description":"List all entitlements. Restricted to Partly Staff","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.Entitlement"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EntitlementsListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.events.get":{"description":"Get an individual billing event","post":{"operationId":"billing.events.get","tags":["Billing"],"description":"Get an individual billing event","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EventDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EventGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.events.list":{"description":"Lists billing events which the current user is permitted to see","post":{"operationId":"billing.events.list","tags":["Billing"],"description":"Lists billing events which the current user is permitted to see","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EventListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.EventDetailItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.EventDetailItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.EventListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.attachments.get":{"description":"Get a presigned download URL for one billing invoice attachment","post":{"operationId":"billing.invoices.attachments.get","tags":["Billing"],"description":"Get a presigned download URL for one billing invoice attachment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentUrlRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.AttachmentUrlResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentUrlError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.attachments.insert":{"description":"Commit uploaded private attachments to a billing invoice","post":{"operationId":"billing.invoices.attachments.insert","tags":["Billing"],"description":"Commit uploaded private attachments to a billing invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.attachments.list":{"description":"List private attachments on a billing invoice (is_internal visibility applied)","post":{"operationId":"billing.invoices.attachments.list","tags":["Billing"],"description":"List private attachments on a billing invoice (is_internal visibility applied)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.attachments.prepare":{"description":"Prepare private upload URLs for files attached to a billing invoice","post":{"operationId":"billing.invoices.attachments.prepare","tags":["Billing"],"description":"Prepare private upload URLs for files attached to a billing invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsPrepareRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.AttachmentsPrepareResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentsPrepareError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.attachments.remove":{"description":"Remove a private attachment from a billing invoice","post":{"operationId":"billing.invoices.attachments.remove","tags":["Billing"],"description":"Remove a private attachment from a billing invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceAttachmentRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.get":{"description":"Get invoice details","post":{"operationId":"billing.invoices.get","tags":["Billing"],"description":"Get invoice details","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.insert":{"description":"Create a new draft invoice","post":{"operationId":"billing.invoices.insert","tags":["Billing"],"description":"Create a new draft invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceCreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.list":{"description":"List invoices with optional filters and pagination","post":{"operationId":"billing.invoices.list","tags":["Billing"],"description":"List invoices with optional filters and pagination","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.InvoiceListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.InvoiceListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.orders.list":{"description":"List the orders behind an invoice's metered lines, computed from the usage facts the invoice was generated from, with per-line totals that reconcile to the invoice","post":{"operationId":"billing.invoices.orders.list","tags":["Billing"],"description":"List the orders behind an invoice's metered lines, computed from the usage facts the invoice was generated from, with per-line totals that reconcile to the invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceOrderDetailListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceOrderDetailPage"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceOrderDetailListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.overdue-status.get":{"description":"Overdue-invoice status for the current organization: whether payable invoices are past due, when access will be suspended for non-payment, and a payment link","post":{"operationId":"billing.invoices.overdue-status.get","tags":["Billing"],"description":"Overdue-invoice status for the current organization: whether payable invoices are past due, when access will be suspended for non-payment, and a payment link","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceOverdueStatusRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceOverdueStatusResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceOverdueStatusError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.invoices.update":{"description":"Update an existing invoice, e.g. status or metadata","post":{"operationId":"billing.invoices.update","tags":["Billing"],"description":"Update an existing invoice, e.g. status or metadata","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceDetail"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.InvoiceUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.notes.insert":{"description":"Add an internal note to a billing customer or invoice","post":{"operationId":"billing.notes.insert","tags":["Billing"],"description":"Add an internal note to a billing customer or invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.notes.list":{"description":"List internal notes on a billing customer or invoice","post":{"operationId":"billing.notes.list","tags":["Billing"],"description":"List internal notes on a billing customer or invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.notes.remove":{"description":"Delete a billing note","post":{"operationId":"billing.notes.remove","tags":["Billing"],"description":"Delete a billing note","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.notes.update":{"description":"Edit the body of a billing note","post":{"operationId":"billing.notes.update","tags":["Billing"],"description":"Edit the body of a billing note","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.NoteUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.payment-method-setups.get":{"description":"Resume payment-method setup and return a provider-neutral next action","post":{"operationId":"billing.payment-method-setups.get","tags":["Billing"],"description":"Resume payment-method setup and return a provider-neutral next action","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodSetupGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodSetupItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodSetupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.payment-method-setups.insert":{"description":"Start an asynchronous reusable payment-method setup","post":{"operationId":"billing.payment-method-setups.insert","tags":["Billing"],"description":"Start an asynchronous reusable payment-method setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodSetupStartRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodSetupItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodSetupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.payment-methods.list":{"description":"List a customer's active payment methods, mandate, collection profile, and any resumable setup","post":{"operationId":"billing.payment-methods.list","tags":["Billing"],"description":"List a customer's active payment methods, mandate, collection profile, and any resumable setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodsListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodsListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodsListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.payment-methods.remove":{"description":"Remove a reusable payment method and turn off automatic collection","post":{"operationId":"billing.payment-methods.remove","tags":["Billing"],"description":"Remove a reusable payment method and turn off automatic collection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentMethodRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.payments.insert":{"description":"Record a manual payment against an invoice","post":{"operationId":"billing.payments.insert","tags":["Billing"],"description":"Record a manual payment against an invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.payments.list":{"description":"List payments recorded against a billing customer or invoice","post":{"operationId":"billing.payments.list","tags":["Billing"],"description":"List payments recorded against a billing customer or invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.payments.update":{"description":"Edit a manually recorded payment","post":{"operationId":"billing.payments.update","tags":["Billing"],"description":"Edit a manually recorded payment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PaymentUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.prices.get":{"description":"Get detailed information for a specific price","post":{"operationId":"billing.prices.get","tags":["Billing"],"description":"Get detailed information for a specific price","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.prices.insert":{"description":"Create a new price for an existing product","post":{"operationId":"billing.prices.insert","tags":["Billing"],"description":"Create a new price for an existing product","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceCreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.prices.list":{"description":"List prices of Products and Services","post":{"operationId":"billing.prices.list","tags":["Billing"],"description":"List prices of Products and Services","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.PriceListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.PriceListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.prices.remove":{"description":"Remove an individual price for an existing product","post":{"operationId":"billing.prices.remove","tags":["Billing"],"description":"Remove an individual price for an existing product","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.prices.update":{"description":"Update a price for an existing product","post":{"operationId":"billing.prices.update","tags":["Billing"],"description":"Update a price for an existing product","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.PriceUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.products.entitlements.insert":{"description":"Creates a relation between a billing product and an entitlement","post":{"operationId":"billing.products.entitlements.insert","tags":["Billing"],"description":"Creates a relation between a billing product and an entitlement","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductEntitlementsAddRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductEntitlementsAddError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.products.entitlements.remove":{"description":"Removes a relation between a billing product and an entitlements","post":{"operationId":"billing.products.entitlements.remove","tags":["Billing"],"description":"Removes a relation between a billing product and an entitlements","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductEntitlementsRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductEntitlementsRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.products.get":{"description":"Get an individual Product or Service","post":{"operationId":"billing.products.get","tags":["Billing"],"description":"Get an individual Product or Service","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.products.insert":{"description":"Create an individual Product or Service","post":{"operationId":"billing.products.insert","tags":["Billing"],"description":"Create an individual Product or Service","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductCreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.products.list":{"description":"List Products and Services","post":{"operationId":"billing.products.list","tags":["Billing"],"description":"List Products and Services","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.ProductListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.ProductListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.products.remove":{"description":"Remove an individual Product or Service","post":{"operationId":"billing.products.remove","tags":["Billing"],"description":"Remove an individual Product or Service","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.products.update":{"description":"Update an individual Product or Service","post":{"operationId":"billing.products.update","tags":["Billing"],"description":"Update an individual Product or Service","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.ProductUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.staff-dashboard.get":{"description":"Global billing dashboard summary for Partly staff","post":{"operationId":"billing.staff-dashboard.get","tags":["Billing"],"description":"Global billing dashboard summary for Partly staff","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.StaffDashboardGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.StaffDashboardSummary"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.StaffDashboardGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.get":{"description":"Get detail on a billing subscription","post":{"operationId":"billing.subscriptions.get","tags":["Billing"],"description":"Get detail on a billing subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.insert":{"description":"Create a billing subscription for a customer.","post":{"operationId":"billing.subscriptions.insert","tags":["Billing"],"description":"Create a billing subscription for a customer.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionCreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.invoice-preview.get":{"description":"Preview a subscription invoice using its effective billing terms","post":{"operationId":"billing.subscriptions.invoice-preview.get","tags":["Billing"],"description":"Preview a subscription invoice using its effective billing terms","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionInvoicePreviewRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionInvoicePreview"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionInvoicePreviewError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.issuance.get":{"description":"Get recurring invoice issuance configuration and its latest outcome","post":{"operationId":"billing.subscriptions.issuance.get","tags":["Billing"],"description":"Get recurring invoice issuance configuration and its latest outcome","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionIssuanceGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.SubscriptionIssuanceSchedule"}]}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionIssuanceGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.issuance.update":{"description":"Enable, pause or retry Partly-owned recurring invoice issuance from a reviewed service period","post":{"operationId":"billing.subscriptions.issuance.update","tags":["Billing"],"description":"Enable, pause or retry Partly-owned recurring invoice issuance from a reviewed service period","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionIssuanceConfigureRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionIssuanceSchedule"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionIssuanceConfigureError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.list":{"description":"List billing subscriptions","post":{"operationId":"billing.subscriptions.list","tags":["Billing"],"description":"List billing subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionListItem"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.remove":{"description":"Remove an individual billing subscription","post":{"operationId":"billing.subscriptions.remove","tags":["Billing"],"description":"Remove an individual billing subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.subscriptions.update":{"description":"Update a billing subscription for a customer","post":{"operationId":"billing.subscriptions.update","tags":["Billing"],"description":"Update a billing subscription for a customer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.SubscriptionUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.tax-rates.get":{"description":"Get details of a specific tax rate","post":{"operationId":"billing.tax-rates.get","tags":["Billing"],"description":"Get details of a specific tax rate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.tax-rates.insert":{"description":"Create a new tax rate","post":{"operationId":"billing.tax-rates.insert","tags":["Billing"],"description":"Create a new tax rate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateCreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.tax-rates.list":{"description":"List tax rates with optional filtering","post":{"operationId":"billing.tax-rates.list","tags":["Billing"],"description":"List tax rates with optional filtering","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.TaxRateListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.TaxRateListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.tax-rates.remove":{"description":"Delete a tax rate","post":{"operationId":"billing.tax-rates.remove","tags":["Billing"],"description":"Delete a tax rate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.tax-rates.update":{"description":"Update an existing tax rate","post":{"operationId":"billing.tax-rates.update","tags":["Billing"],"description":"Update an existing tax rate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateDetailItem"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.TaxRateUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.usage-by-dimension.list":{"description":"Get usage summaries grouped by a dimension (e.g., by customer).","post":{"operationId":"billing.usage-by-dimension.list","tags":["Billing"],"description":"Get usage summaries grouped by a dimension (e.g., by customer).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.UsageByDimensionParams"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.GroupedUsageItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.GroupedUsageItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.UsageByDimensionListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.usage-meters.list":{"description":"Lists usage meters which the current user is permitted to see","post":{"operationId":"billing.usage-meters.list","tags":["Billing"],"description":"Lists usage meters which the current user is permitted to see","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.UsageMeterListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.UsageMeterListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.UsageMeterListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.UsageMeterListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/billing.usage-summaries.list":{"description":"Get time-series usage summaries (e.g., usage per day).","post":{"operationId":"billing.usage-summaries.list","tags":["Billing"],"description":"Get time-series usage summaries (e.g., usage per day).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.UsageSummaryListParams"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<billing.UsageSummaryItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.UsageSummaryItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/billing.UsageSummaryListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.insert-many":{"description":"Insert many business rules in one transaction. Every rule is sourced from the same subject organization; each entry becomes its own rule.","post":{"operationId":"business-rules.insert-many","tags":["business-rules"],"description":"Insert many business rules in one transaction. Every rule is sourced from the same subject organization; each entry becomes its own rule.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_insert_many.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_insert_many.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_insert_many.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.remove":{"description":"Remove a business rule","post":{"operationId":"business-rules.remove","tags":["business-rules"],"description":"Remove a business rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_remove.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules.BusinessRule"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_remove.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.remove-many":{"description":"Remove many business rules in one call. Every rule must belong to the same subject organization; ids that match nothing are reported in `not_found`.","post":{"operationId":"business-rules.remove-many","tags":["business-rules"],"description":"Remove many business rules in one call. Every rule must belong to the same subject organization; ids that match nothing are reported in `not_found`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_remove_many.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_remove_many.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_remove_many.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.v2.evaluate":{"description":"Evaluates a business rule against a context (V2, schema-based). When using BulkEvaluate mode, defaults to a maximum of 1000 results per page when no limit is specified.","post":{"operationId":"business-rules.v2.evaluate","tags":["business-rules"],"description":"Evaluates a business rule against a context (V2, schema-based). When using BulkEvaluate mode, defaults to a maximum of 1000 results per page when no limit is specified.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_evaluate_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_evaluate_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_evaluate_v2.BusinessRulesEvaluateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.v2.get":{"description":"Gets a business rule (V2). Returns the rule body as a typed RuleSchema","post":{"operationId":"business-rules.v2.get","tags":["business-rules"],"description":"Gets a business rule (V2). Returns the rule body as a typed RuleSchema","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_get_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_get_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.v2.insert":{"description":"Insert a new business rule","post":{"operationId":"business-rules.v2.insert","tags":["business-rules"],"description":"Insert a new business rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_insert_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_insert_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_insert.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.v2.list":{"description":"Lists business rules (V2). Returns rule bodies as typed RuleSchema, sorted by priority descending with cursor-based pagination. Defaults to a maximum of 1000 results per page when no limit is specified.","post":{"operationId":"business-rules.v2.list","tags":["business-rules"],"description":"Lists business rules (V2). Returns rule bodies as typed RuleSchema, sorted by priority descending with cursor-based pagination. Defaults to a maximum of 1000 results per page when no limit is specified.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_list_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_list_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_list.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-rules.v2.update":{"description":"Update a business rule","post":{"operationId":"business-rules.v2.update","tags":["business-rules"],"description":"Update a business rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_update_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_update_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_rules_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-tags.businesses.search":{"description":"Lists the businesses carrying one tag, ordered by name. `name_contains` matches the business or organization name. Partly staff only.","post":{"operationId":"business-tags.businesses.search","tags":["Network Validation"],"description":"Lists the businesses carrying one tag, ordered by name. `name_contains` matches the business or organization name. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_businesses_search.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Forward-paginated list plus the total number of items matching the\nrequest, independent of pagination. Use this for endpoints whose\nclients render \"showing N of M\" counts or drive page-number UIs.","type":"object","title":"ForwardPaginatedListWithTotal<business_tags_businesses_search.TaggedBusiness>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_tags_businesses_search.TaggedBusiness"}},"pagination":{"$ref":"#/components/schemas/ForwardPaginationWithTotal"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_businesses_search.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/business-tags.search":{"description":"Lists the distinct tags carried by at least one business in `country`. `id_contains` matches a case-insensitive substring of the tag id. Partly staff only.","post":{"operationId":"business-tags.search","tags":["Network Validation"],"description":"Lists the distinct tags carried by at least one business in `country`. `id_contains` matches a case-insensitive substring of the tag id. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_search.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<business_network.Tag>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Tag"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_search.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.get":{"description":"Gets business entity details which have related groups where the current user is a member","post":{"operationId":"businesses.get","tags":["Business Network"],"description":"Gets business entity details which have related groups where the current user is a member","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_get.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_get.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.insert":{"description":"Inserts a new business.\nThe current user should be an admin of an owning organization","post":{"operationId":"businesses.insert","tags":["Business Network"],"description":"Inserts a new business.\nThe current user should be an admin of an owning organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_insert.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_insert.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_insert.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.insurer.get":{"description":"This endpoint allows an authorized repairer to fetch details about an insurer business.","post":{"operationId":"businesses.insurer.get","tags":["Business Network"],"description":"This endpoint allows an authorized repairer to fetch details about an insurer business.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_insurer_get.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_insurer_get.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_insurer_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.list":{"description":"Lists businesses which have related groups where the current user is a member.\nThe request requires 1 or many specific business entity types to filter by","post":{"operationId":"businesses.list","tags":["Business Network"],"description":"Lists businesses which have related groups where the current user is a member.\nThe request requires 1 or many specific business entity types to filter by","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_list.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_list.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_list.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.remove":{"description":"Removes a business from the network. The current user should be in the admin group for the business","post":{"operationId":"businesses.remove","tags":["Business Network"],"description":"Removes a business from the network. The current user should be in the admin group for the business","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_remove.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_remove.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.repairers.get":{"description":"Returns the repairer profile of a repairer site business of the current user's organization, with the site's preferences merged over its organization's repairer.","post":{"operationId":"businesses.repairers.get","tags":["Business Network"],"description":"Returns the repairer profile of a repairer site business of the current user's organization, with the site's preferences merged over its organization's repairer.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_repairers_get.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_network.Repairer"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_repairers_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.search":{"description":"Lists businesses filtered by name and kind across all organizations.","post":{"operationId":"businesses.search","tags":["Business Network"],"description":"Lists businesses filtered by name and kind across all organizations.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_search.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<business_network.PublicBusiness>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.PublicBusiness"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_search.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.tags.get":{"description":"Returns the tags on one business. Partly staff only.","post":{"operationId":"businesses.tags.get","tags":["Network Validation"],"description":"Returns the tags on one business. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_get.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_get.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.tags.update":{"description":"Inserts and removes tags on a business. Tags are country-scoped labels a violation definition reads to decide which businesses it applies to. Partly staff only.","post":{"operationId":"businesses.tags.update","tags":["Network Validation"],"description":"Inserts and removes tags on a business. Tags are country-scoped labels a violation definition reads to decide which businesses it applies to. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_update.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business_tags_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/businesses.update":{"description":"Updates business details.\nThe current user should be in the admin group for the business","post":{"operationId":"businesses.update","tags":["Business Network"],"description":"Updates business details.\nThe current user should be in the admin group for the business","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_update.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/businesses_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.evaluate":{"description":"Evaluates a batch of commerce rules (at most 500 items). The caller must be a party to each rule (group owner or mapped business); results are index-aligned and failures are per-item","post":{"operationId":"commerce.evaluate","tags":["Commerce"],"description":"Evaluates a batch of commerce rules (at most 500 items). The caller must be a party to each rule (group owner or mapped business); results are index-aligned and failures are per-item","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.evaluate.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.evaluate.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.mapping.update":{"description":"Inserts and removes commerce group mappings in one transaction; groups must be owned by the caller","post":{"operationId":"commerce.mapping.update","tags":["Commerce"],"description":"Inserts and removes commerce group mappings in one transaction; groups must be owned by the caller","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.mapping.UpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.mapping.UpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.get":{"description":"Retrieves a repairer-owned commerce group with the rule of highest version and its mappings","post":{"operationId":"commerce.repairer.group.get","tags":["Commerce"],"description":"Retrieves a repairer-owned commerce group with the rule of highest version and its mappings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerGroup"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.insert":{"description":"Creates a repairer-owned commerce group (e.g. a margin group). The variant carries the expected evaluation context version; a group is referenced by rules and mapped to (insurer) businesses","post":{"operationId":"commerce.repairer.group.insert","tags":["Commerce"],"description":"Creates a repairer-owned commerce group (e.g. a margin group). The variant carries the expected evaluation context version; a group is referenced by rules and mapped to (insurer) businesses","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerGroup"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.list":{"description":"Lists repairer-owned commerce groups with the rule of highest version and their mappings","post":{"operationId":"commerce.repairer.group.list","tags":["Commerce"],"description":"Lists repairer-owned commerce groups with the rule of highest version and their mappings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<commerce.group.RepairerGroup>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.group.RepairerGroup"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.remove":{"description":"Hard deletes a repairer-owned commerce group and all associated rules and mappings","post":{"operationId":"commerce.repairer.group.remove","tags":["Commerce"],"description":"Hard deletes a repairer-owned commerce group and all associated rules and mappings","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerGroup"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.v2.get":{"description":"v2 of repairer.group.get; the returned group embeds the typed, variant-tagged rule","post":{"operationId":"commerce.repairer.group.v2.get","tags":["Commerce"],"description":"v2 of repairer.group.get; the returned group embeds the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.v2.insert":{"description":"v2 of repairer.group.insert; the returned group embeds the typed, variant-tagged rule","post":{"operationId":"commerce.repairer.group.v2.insert","tags":["Commerce"],"description":"v2 of repairer.group.insert; the returned group embeds the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.v2.list":{"description":"v2 of repairer.group.list; the returned groups embed the typed, variant-tagged rule","post":{"operationId":"commerce.repairer.group.v2.list","tags":["Commerce"],"description":"v2 of repairer.group.list; the returned groups embed the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<commerce.group.RepairerGroupV2>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.group.RepairerGroupV2"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.v2.remove":{"description":"v2 of repairer.group.remove; the returned group embeds the typed, variant-tagged rule","post":{"operationId":"commerce.repairer.group.v2.remove","tags":["Commerce"],"description":"v2 of repairer.group.remove; the returned group embeds the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.repairer.group.v2.update":{"description":"Updates a repairer-owned group's name and default flag. Promoting to default atomically demotes the repairer's current default for that variant; groups must be owned by the caller","post":{"operationId":"commerce.repairer.group.v2.update","tags":["Commerce"],"description":"Updates a repairer-owned group's name and default flag. Promoting to default atomically demotes the repairer's current default for that variant; groups must be owned by the caller","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.RepairerGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.rule.update":{"description":"Inserts and removes commerce rules in one transaction. Inserted rules are versioned by the service (next version for the group) and validated against the group variant's context and output schemas; groups must be owned by the caller","post":{"operationId":"commerce.rule.update","tags":["Commerce"],"description":"Inserts and removes commerce rules in one transaction. Inserted rules are versioned by the service (next version for the group) and validated against the group variant's context and output schemas; groups must be owned by the caller","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.rule.UpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.rule.UpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.rule.v2.update":{"description":"v2 of rule.update; each rule is typed and variant-tagged via its schema. Inserted rules are validated against the group variant (a mismatch is rejected) and versioned by the service","post":{"operationId":"commerce.rule.v2.update","tags":["Commerce"],"description":"v2 of rule.update; each rule is typed and variant-tagged via its schema. Inserted rules are validated against the group variant (a mismatch is rejected) and versioned by the service","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.rule.UpdateRequestV2"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.rule.UpdateResponseV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.get":{"description":"Retrieves a supplier-owned commerce group with the rule of highest version and its mappings","post":{"operationId":"commerce.supplier.group.get","tags":["Commerce"],"description":"Retrieves a supplier-owned commerce group with the rule of highest version and its mappings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierGroup"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.insert":{"description":"Creates a supplier-owned commerce group. The variant carries the expected evaluation context version; a group is referenced by rules and mapped to (repairer) businesses","post":{"operationId":"commerce.supplier.group.insert","tags":["Commerce"],"description":"Creates a supplier-owned commerce group. The variant carries the expected evaluation context version; a group is referenced by rules and mapped to (repairer) businesses","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierGroup"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.list":{"description":"Lists supplier-owned commerce groups with the rule of highest version and their mappings","post":{"operationId":"commerce.supplier.group.list","tags":["Commerce"],"description":"Lists supplier-owned commerce groups with the rule of highest version and their mappings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<commerce.group.SupplierGroup>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.group.SupplierGroup"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.remove":{"description":"Hard deletes a supplier-owned commerce group and all associated rules and mappings","post":{"operationId":"commerce.supplier.group.remove","tags":["Commerce"],"description":"Hard deletes a supplier-owned commerce group and all associated rules and mappings","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierGroup"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.v2.get":{"description":"v2 of supplier.group.get; the returned group embeds the typed, variant-tagged rule","post":{"operationId":"commerce.supplier.group.v2.get","tags":["Commerce"],"description":"v2 of supplier.group.get; the returned group embeds the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.v2.insert":{"description":"v2 of supplier.group.insert; the returned group embeds the typed, variant-tagged rule","post":{"operationId":"commerce.supplier.group.v2.insert","tags":["Commerce"],"description":"v2 of supplier.group.insert; the returned group embeds the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.v2.list":{"description":"v2 of supplier.group.list; the returned groups embed the typed, variant-tagged rule","post":{"operationId":"commerce.supplier.group.v2.list","tags":["Commerce"],"description":"v2 of supplier.group.list; the returned groups embed the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<commerce.group.SupplierGroupV2>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.group.SupplierGroupV2"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.v2.remove":{"description":"v2 of supplier.group.remove; the returned group embeds the typed, variant-tagged rule","post":{"operationId":"commerce.supplier.group.v2.remove","tags":["Commerce"],"description":"v2 of supplier.group.remove; the returned group embeds the typed, variant-tagged rule","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.supplier.group.v2.update":{"description":"Updates a supplier-owned group's name and default flag. Promoting to default atomically demotes the supplier's current default for that variant; groups must be owned by the caller","post":{"operationId":"commerce.supplier.group.v2.update","tags":["Commerce"],"description":"Updates a supplier-owned group's name and default flag. Promoting to default atomically demotes the supplier's current default for that variant; groups must be owned by the caller","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.group.SupplierGroupV2"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/commerce.tier.list":{"description":"List the size-tier catalogue (tier number + label) and the part-type to size-tier assignments referenced by shipping-pricing zone grids and carriers","post":{"operationId":"commerce.tier.list","tags":["Commerce"],"description":"List the size-tier catalogue (tier number + label) and the part-type to size-tier assignments referenced by shipping-pricing zone grids and carriers","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.tier.ListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/commerce.CommerceRulesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/diagram-image-urls.get":{"description":"Endpoint for long polling to get diagram image URL from a diagram ID","post":{"operationId":"diagram-image-urls.get","tags":["tier1"],"description":"Endpoint for long polling to get diagram image URL from a diagram ID","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramImageUrlGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramImageUrlGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/dismantler.vehicle.get":{"description":"Gets a dismantler vehicle by id.","post":{"operationId":"dismantler.vehicle.get","tags":["Dismantler"],"description":"Gets a dismantler vehicle by id.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleModel"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/dismantler.vehicle.insert":{"description":"Inserts a new dismantler vehicle. Presumes the user's store is the insertion target.","post":{"operationId":"dismantler.vehicle.insert","tags":["Dismantler"],"description":"Inserts a new dismantler vehicle. Presumes the user's store is the insertion target.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/dismantler.vehicle.search":{"description":"Retrieves dismantler vehicles within the user's store.","post":{"operationId":"dismantler.vehicle.search","tags":["Dismantler"],"description":"Retrieves dismantler vehicles within the user's store.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<dismantler.DismantlerVehicleModel>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleModel"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/dismantler.vehicle.update":{"description":"Updates a dismantler vehicle.","post":{"operationId":"dismantler.vehicle.update","tags":["Dismantler"],"description":"Updates a dismantler vehicle.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleModel"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/dismantler.yard.count":{"description":"Counts the number of vehicles set as being 'in yard'","post":{"operationId":"dismantler.yard.count","tags":["Dismantler"],"description":"Counts the number of vehicles set as being 'in yard'","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.YardVehicleCountResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dismantler.DismantlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/donor-vehicle.sellables.search":{"description":"Searches for sellable items for a given donor vehicle\nfiltered by HCA and supplier IDs, returning them grouped by store.","post":{"operationId":"donor-vehicle.sellables.search","tags":["Lookup"],"description":"Searches for sellable items for a given donor vehicle\nfiltered by HCA and supplier IDs, returning them grouped by store.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.DonorVehicleRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.DonorVehicleResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.LookupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/email-templates.default.insert":{"description":"Create the default template for a kind — the one every organisation without its own falls back to.","post":{"operationId":"email-templates.default.insert","tags":["EmailTemplates"],"description":"Create the default template for a kind — the one every organisation without its own falls back to.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.DefaultInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.DefaultInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.WriteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/email-templates.get":{"description":"One live template by id.","post":{"operationId":"email-templates.get","tags":["EmailTemplates"],"description":"One live template by id.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.GetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.GetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/email-templates.insert":{"description":"Create a template for your organisation. Requires an organisation admin.","post":{"operationId":"email-templates.insert","tags":["EmailTemplates"],"description":"Create a template for your organisation. Requires an organisation admin.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.InsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.InsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.WriteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/email-templates.list":{"description":"Every live template visible to the caller — their organisation's own, plus the platform templates every organisation falls back to.","post":{"operationId":"email-templates.list","tags":["EmailTemplates"],"description":"Every live template visible to the caller — their organisation's own, plus the platform templates every organisation falls back to.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.ListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.ListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.ListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/email-templates.preview":{"description":"Render a template against a representative payload without storing it, so an author can see the email before saving. The result is sanitised, as every render is, so it also shows what the allowlist removed.","post":{"operationId":"email-templates.preview","tags":["EmailTemplates"],"description":"Render a template against a representative payload without storing it, so an author can see the email before saving. The result is sanitised, as every render is, so it also shows what the allowlist removed.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.PreviewRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.PreviewResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.PreviewError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/email-templates.remove":{"description":"Remove your organisation's template for a kind. It falls back to the Partly default again. Requires an organisation admin.","post":{"operationId":"email-templates.remove","tags":["EmailTemplates"],"description":"Remove your organisation's template for a kind. It falls back to the Partly default again. Requires an organisation admin.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.RemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.WriteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/email-templates.update":{"description":"Replace a template's html. Requires an organisation admin.","post":{"operationId":"email-templates.update","tags":["EmailTemplates"],"description":"Replace a template's html. Requires an organisation admin.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.UpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.UpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/email_templates.WriteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/feature-flags.evaluate":{"description":"Evaluate a feature flag and return the resolved value","post":{"operationId":"feature-flags.evaluate","tags":["feature-flags"],"description":"Evaluate a feature flag and return the resolved value","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/core_server_feature_flags.EvaluateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core_server_feature_flags.EvaluateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core_server_feature_flags.EvaluateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/file-imports.get":{"description":"Basic statistics for specific file","post":{"operationId":"file-imports.get","tags":["Ingest"],"description":"Basic statistics for specific file","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.GetFileRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.FileImportEntity"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.FileImportsGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/file-imports.insert":{"description":"Registers an uploaded file for asynchronous ingest and returns accepted file_path.\n\nRequest parameters:\n- file_path: required storage path to uploaded file; must include a valid UTF-8 file name.\n- prev_file_path: optional explicit previous file path from the same store for differential ingest.\n- data_origin: optional label for the complete feed schema of one logical source.\n- data_stream: optional subset inside `data_origin` scope (for example prices, stock, fitment).\n- row_reconcile_policy: policy controlling how rows missing from current file are reconciled against previous file.\n- ignore_data_columns_header_diff: optional boolean that keeps differential ingest active when only data-column headers changed.\n- missing_row_defaults: optional flat object of file field names to scalar default values used only with `reset_missing_row_defaults`.\n\nCSV sellable columns:\n- `AssembledInto`: optional parent sellable reference for assembly hierarchy.\n    - Non-empty value is treated as a parent sellable identity and may be either a SKU or UUID.\n    - file-ingestor translates it into the existing assembly grouping ingest request used by data-ingestor.\n    - The parent sellable must already exist or be defined earlier in the same file.\n    - Explicit `null` clears the current assembly link for that sellable.\n    - Clearing a middle node also clears assembly links for descendants in the detached sub-assembly chain.\n    - Empty or omitted value leaves the current assembly link unchanged.\n\nDifferential ingest:\n- If prev_file_path is provided, data-ingestor resolves that file at insert time and persists the exact previous file id used later by file-ingestor.\n- If data_origin is provided, data-ingestor resolves the previous file at insert time and persists the exact previous file id used later by file-ingestor.\n- If data_origin is omitted and prev_file_path is not provided request runs as ordinary ingest.\n- Differential key requirements for CSV. The header should contain either:\n    - `Sku` column, or\n    - full composite key columns: `Brand`, `PartNumber`, `CrossReferenceBrand`, `CrossReferencePartNumbers`.\n- If a differential ingest is attempted and current CSV header contains both key strategies,\n  file-ingestor records a header issue and marks file processing with an error.\n- If a differential ingest is attempted and current CSV header contains neither key strategy,\n  file-ingestor records a header issue and marks file processing with an error.\n- Each row in file should have a unique not empty value in the key column.\n- Differential ingest processes new/changed rows and reconciles missing previous rows by policy:\n    - `delete_prev_except_current` (default): remove missing rows.\n    - `delete_origin_except_source`: valid only for origin-only ingests.\n        Request must provide `data_origin` and must not provide `data_stream`.\n        Cannot be combined with `ignore_data_columns_header_diff`.\n        file-ingestor disables row diffing for the current file, ingests current rows as ordinary ingest,\n        then data-ingestor deletes rows in the same `(store_id, data_origin)` not written by current source feed.\n    - `keep_all`: keep missing rows unchanged.\n        Cannot be combined with `ignore_data_columns_header_diff` because skipping row comparison would otherwise degrade to ordinary ingest and defeat the purpose of differential reconciliation.\n    - `reset_missing_row_defaults`: update missing SKU rows with the field values provided in `missing_row_defaults` instead of deleting them.\n        Requires `missing_row_defaults` and currently supports only Sku-based differential ingest.\n        If differential ingest resolves to composite-key mode, file processing fails instead of partially reconciling rows.\n        `missing_row_defaults` must be a flat object whose values are string, number, boolean, or null.\n        Example:\n        current file columns: `Sku`, `PartNumber`, `Brand`, `RetailPrice`, `Stock:<store_address_uuid>`, `Backorderable:<store_address_uuid>`\n        `missing_row_defaults`:\n        `{\"RetailPrice\": null, \"Stock:<store_address_uuid>\": 0, \"Backorderable:<store_address_uuid>\": false}`\n        Result for a missing row from the previous file:\n        `Sku`, `PartNumber`, and `Brand` remain unchanged because they are not included in `missing_row_defaults`.\n        `RetailPrice` is reset to `null`, `Stock:<store_address_uuid>` is reset to `0`, and `Backorderable:<store_address_uuid>` is reset to `false`.\n- When `ignore_data_columns_header_diff=true`:\n    - request must provide either `prev_file_path` or `data_origin`,\n    - current and previous file headers must still contain exactly one identity strategy: `Sku` or the full composite key,\n    - current and previous headers must use the same identity strategy,\n    - header differences outside identity columns do not disable differential ingest,\n    - row byte comparison is skipped when headers differ, so matching keys are treated as changed rows,\n    - file-ingestor still removes matching keys from the previous-file index and applies reconcile policy to the remaining missing rows,\n    - if the previous header cannot be read, processing fails instead of falling back to ordinary ingest.\n- Whenever file-import reconciliation deletes a parent sellable in data-ingestor, sub-assemblies linked through assembly groupings are deleted recursively as part of the same removal flow.\n- `count_items_deleted` counts only sellable rows deleted by reconciliation policies. Ordinary ingest `remove` rows in the file do not change the counter. Cascaded sub-assembly deletions performed by data-ingestor do not change the counter. Cleanup of related uploads, tags, inventories, and groupings does not increase `count_items_deleted`.\n\nOrigin and stream model:\n- Each origin is a complete feed schema: `Origin = IdentityColumns ∪ DataColumns`.\n- A stream is a subset of that origin schema.\n- Every stream must contain all identity columns.\n- Every stream must contain a subset of data columns.\n- For streams of the same origin:\n    - identity columns may overlap,\n    - data columns must be pairwise disjoint,\n    - each data column belongs to exactly one stream.\n- Identity columns can overlap because every stream needs the same keys to identify and match rows.\n- Data columns must be disjoint because a stream is the unique diff history for its data columns.\n- Short rule: streams share keys, but not payload.\n\nSimple examples:\n- Valid split:\n    - Origin = `{id1, id2, data1, data2, data3, data4}`\n    - Stream `prices` = `{id1, id2, data1, data2}`\n    - Stream `stock` = `{id1, id2, data3, data4}`\n    - Valid because the identity columns are shared and the data columns do not overlap.\n- Invalid split:\n    - Stream `prices` = `{id1, id2, data1, data2}`\n    - Stream `stock` = `{id1, id2, data2, data3}`\n    - Invalid because `data2` appears in more than one stream.\n\nFallback to ordinary ingest:\n- If no previous file is resolved, ingest runs as ordinary ingest.\n- If previous file is resolved but previous CSV header cannot be read, ingest falls back to ordinary ingest.\n- If previous file is resolved but current and previous CSV headers do not match byte-for-byte, ingest falls back to ordinary ingest.\n- If the latest same-origin ingest overall has the opposite scope shape (`data_stream = null` vs non-null relative to current),\n  ingest falls back to ordinary ingest.\n- With `ignore_data_columns_header_diff=true`, those ordinary-ingest fallbacks are disabled for previous-file resolution and previous-header readability. Processing fails instead.\n\nAutomatic previous-file discovery details (when `prev_file_path` is not provided):\n1) Discovery runs only within the same `store_id`.\n2) If `data_origin` is omitted, scope-based candidate selection is skipped.\n3) Candidates are scanned from newest to oldest by created_at.\n4) Exhausted failed candidates are skipped before any opposite-scope or same-stream decision.\n5) If the first non-exhausted same-origin candidate has opposite scope shape (`data_stream = null` vs non-null relative to current),\n    current file runs as ordinary ingest only if that candidate has completed `file_ingestor`.\n    If that newer same-origin candidate is still pending, `file-imports.insert` fails with `422 prev_file_ingest_not_completed`\n    instead of skipping it and searching older same-scope history.\n6) If current file has `data_origin` and no `data_stream`, eligible same-scope candidates are previous origin-only files with equal `data_origin`.\n7) If current file has `data_origin` + `data_stream`, eligible same-scope candidates are previous files with equal `data_origin` and equal `data_stream`.\n    A different stream does not count as a diff baseline for the current stream.\n8) A discovered previous file used for differential ingest must have completed `file_ingestor` stage.\n9) If the newest non-exhausted same-origin candidate is still waiting to be processed,\n    `file-imports.insert` fails with `422 prev_file_ingest_not_completed`.\n10) If no usable candidate remains after exhausted candidates are skipped,\n    insert persists no previous file and ingest runs as ordinary ingest.\n11) With `ignore_data_columns_header_diff=true`, if no usable candidate remains after skipping candidates with unreadable headers,\n    insert fails with `422 ignore_data_columns_header_diff_requires_previous_file` instead of falling back to ordinary ingest.\n\nExplicit previous-file behavior:\n- If `prev_file_path` is provided, it must resolve to a file from the same store.\n- The resolved explicit file must have completed `file_ingestor` stage.\n- If the explicit file exists but has not completed `file_ingestor`, `file-imports.insert` fails with `422 prev_file_ingest_not_completed`.\n\nExample API calls (major no-fallback cases):\n1) No prev file + no origin -> ordinary ingest.\n- Request: `POST /api/v1/file-imports.insert`\n- Body: {\"file_path\":\"imports/store_<store_id>/2026_03/current.csv\"}\n- Previous file match: none, because both `prev_file_path` and `data_origin` are omitted.\n\n2) Explicit prev file -> differential ingest.\n- Request: `POST /api/v1/file-imports.insert`\n- Body: {\"file_path\":\"imports/store_<store_id>/2026_03/current.csv\",\"prev_file_path\":\"imports/store_<store_id>/2026_03/prev.csv\"}\n- Previous file match: exactly `prev_file_path` (same store), scope discovery is bypassed.\n\n3) `data_origin` + `data_stream` -> differential ingest.\n- Request: `POST /api/v1/file-imports.insert`\n- Body: {\"file_path\":\"imports/store_<store_id>/2026_03/current.csv\",\"data_origin\":\"supplier_a\",\"data_stream\":\"prices\"}\n- Previous file match: newest file in same store with equal `data_origin` and equal `data_stream` (`prices`) that has completed `file_ingestor`, unless a newer completed same-origin file has opposite scope shape.\n\nDiff vs ordinary ingest cases:\n- Diff is used:\n    - explicit `prev_file_path` resolves a same-store previous file,\n    - current file is origin-only and the latest same-origin ingest overall is also origin-only,\n    - current file is origin+stream, the latest same-origin ingest overall also has stream scope, and a same-stream baseline exists.\n- Ordinary ingest is used:\n    - no `prev_file_path` and no scope baseline is found,\n    - newest completed same-origin candidate has opposite scope shape (`data_stream = null` vs non-null relative to current),\n    - previous file exists but previous header cannot be read,\n    - previous file exists but headers do not match byte-for-byte,\n    - `row_reconcile_policy=delete_origin_except_source` intentionally disables row diffing for valid origin-only requests.\n- Insert is rejected before processing starts when:\n    - explicit `prev_file_path` exists but has not completed `file_ingestor`,\n    - newest non-exhausted same-origin candidate is still waiting to be processed, even if it has opposite scope shape.\n- Differential ingest is attempted but processing fails instead of falling back when current CSV header contains:\n    - both `Sku` and full composite key columns, or\n    - neither `Sku` nor full composite key columns.\n\nScope mismatch examples:\n- prev has `data_origin = A` and `data_stream = prices`, current has `data_origin = A` and `data_stream = null`.\nResult: ordinary ingest when that latest same-origin ingest has already completed `file_ingestor`. Current origin-only file does not skip that newer stream ingest and search older origin-only history.\n- prev has `data_origin = A` and `data_stream = null`, current has `data_origin = A` and `data_stream = prices`.\nResult: ordinary ingest when that latest same-origin ingest has already completed `file_ingestor`. The first stream file after a full-origin file has no valid stream baseline.\n\nReingest behavior for row data_origin:\n- Reingesting the same rows without `data_origin` sets ingested rows `data_origin` to null in products data.\n- Reingesting the same rows with a different `data_origin` overwrites products rows with the new `data_origin` value.\n- Because previous-file lookup is scope-based, changing or omitting `data_origin` may stop differential linkage to files from other scopes unless `prev_file_path` is explicitly provided.\n\nValidation rules:\n- invalid file_path (no file name or non-UTF-8 file name) returns 422.\n- data_stream without data_origin returns 422.\n- data_origin with prev_file_path is mutually exclusive and returns 422.\n- `row_reconcile_policy=delete_origin_except_source` without `data_origin` returns 422.\n- `row_reconcile_policy=delete_origin_except_source` with `data_stream` returns 422.\n- `ignore_data_columns_header_diff=true` without `prev_file_path` and without `data_origin` returns 422.\n- `ignore_data_columns_header_diff=true` with `row_reconcile_policy=keep_all` returns 422.\n- `ignore_data_columns_header_diff=true` with `row_reconcile_policy=delete_origin_except_source` returns 422.\n- prev_file_path must reference an existing file from the same store if not found returns 404.\n- prev_file_path that resolves to a file which has not completed `file_ingestor` returns 422.\n- the newest non-exhausted same-origin previous file candidate that is still waiting to be processed returns 422.\n- Differential CSV key validation is performed during file processing (not in this insert request):\n    when differential ingest is attempted, current CSV header must contain exactly one strategy:\n    `Sku` or full composite key (`Brand`, `PartNumber`, `CrossReferenceBrand`, `CrossReferencePartNumbers`).\n    If both or neither are present, file-ingestor logs a header issue and marks the file with processing error stats.\n\nNotes:\n- data_origin/data_stream are caller-provided scope identifiers.\n- data_source is system-derived from ingest source metadata and is not a request field.\n- duplicate file_path for the same store is treated as an internal error path (current behavior).","post":{"operationId":"file-imports.insert","tags":["Ingest"],"description":"Registers an uploaded file for asynchronous ingest and returns accepted file_path.\n\nRequest parameters:\n- file_path: required storage path to uploaded file; must include a valid UTF-8 file name.\n- prev_file_path: optional explicit previous file path from the same store for differential ingest.\n- data_origin: optional label for the complete feed schema of one logical source.\n- data_stream: optional subset inside `data_origin` scope (for example prices, stock, fitment).\n- row_reconcile_policy: policy controlling how rows missing from current file are reconciled against previous file.\n- ignore_data_columns_header_diff: optional boolean that keeps differential ingest active when only data-column headers changed.\n- missing_row_defaults: optional flat object of file field names to scalar default values used only with `reset_missing_row_defaults`.\n\nCSV sellable columns:\n- `AssembledInto`: optional parent sellable reference for assembly hierarchy.\n    - Non-empty value is treated as a parent sellable identity and may be either a SKU or UUID.\n    - file-ingestor translates it into the existing assembly grouping ingest request used by data-ingestor.\n    - The parent sellable must already exist or be defined earlier in the same file.\n    - Explicit `null` clears the current assembly link for that sellable.\n    - Clearing a middle node also clears assembly links for descendants in the detached sub-assembly chain.\n    - Empty or omitted value leaves the current assembly link unchanged.\n\nDifferential ingest:\n- If prev_file_path is provided, data-ingestor resolves that file at insert time and persists the exact previous file id used later by file-ingestor.\n- If data_origin is provided, data-ingestor resolves the previous file at insert time and persists the exact previous file id used later by file-ingestor.\n- If data_origin is omitted and prev_file_path is not provided request runs as ordinary ingest.\n- Differential key requirements for CSV. The header should contain either:\n    - `Sku` column, or\n    - full composite key columns: `Brand`, `PartNumber`, `CrossReferenceBrand`, `CrossReferencePartNumbers`.\n- If a differential ingest is attempted and current CSV header contains both key strategies,\n  file-ingestor records a header issue and marks file processing with an error.\n- If a differential ingest is attempted and current CSV header contains neither key strategy,\n  file-ingestor records a header issue and marks file processing with an error.\n- Each row in file should have a unique not empty value in the key column.\n- Differential ingest processes new/changed rows and reconciles missing previous rows by policy:\n    - `delete_prev_except_current` (default): remove missing rows.\n    - `delete_origin_except_source`: valid only for origin-only ingests.\n        Request must provide `data_origin` and must not provide `data_stream`.\n        Cannot be combined with `ignore_data_columns_header_diff`.\n        file-ingestor disables row diffing for the current file, ingests current rows as ordinary ingest,\n        then data-ingestor deletes rows in the same `(store_id, data_origin)` not written by current source feed.\n    - `keep_all`: keep missing rows unchanged.\n        Cannot be combined with `ignore_data_columns_header_diff` because skipping row comparison would otherwise degrade to ordinary ingest and defeat the purpose of differential reconciliation.\n    - `reset_missing_row_defaults`: update missing SKU rows with the field values provided in `missing_row_defaults` instead of deleting them.\n        Requires `missing_row_defaults` and currently supports only Sku-based differential ingest.\n        If differential ingest resolves to composite-key mode, file processing fails instead of partially reconciling rows.\n        `missing_row_defaults` must be a flat object whose values are string, number, boolean, or null.\n        Example:\n        current file columns: `Sku`, `PartNumber`, `Brand`, `RetailPrice`, `Stock:<store_address_uuid>`, `Backorderable:<store_address_uuid>`\n        `missing_row_defaults`:\n        `{\"RetailPrice\": null, \"Stock:<store_address_uuid>\": 0, \"Backorderable:<store_address_uuid>\": false}`\n        Result for a missing row from the previous file:\n        `Sku`, `PartNumber`, and `Brand` remain unchanged because they are not included in `missing_row_defaults`.\n        `RetailPrice` is reset to `null`, `Stock:<store_address_uuid>` is reset to `0`, and `Backorderable:<store_address_uuid>` is reset to `false`.\n- When `ignore_data_columns_header_diff=true`:\n    - request must provide either `prev_file_path` or `data_origin`,\n    - current and previous file headers must still contain exactly one identity strategy: `Sku` or the full composite key,\n    - current and previous headers must use the same identity strategy,\n    - header differences outside identity columns do not disable differential ingest,\n    - row byte comparison is skipped when headers differ, so matching keys are treated as changed rows,\n    - file-ingestor still removes matching keys from the previous-file index and applies reconcile policy to the remaining missing rows,\n    - if the previous header cannot be read, processing fails instead of falling back to ordinary ingest.\n- Whenever file-import reconciliation deletes a parent sellable in data-ingestor, sub-assemblies linked through assembly groupings are deleted recursively as part of the same removal flow.\n- `count_items_deleted` counts only sellable rows deleted by reconciliation policies. Ordinary ingest `remove` rows in the file do not change the counter. Cascaded sub-assembly deletions performed by data-ingestor do not change the counter. Cleanup of related uploads, tags, inventories, and groupings does not increase `count_items_deleted`.\n\nOrigin and stream model:\n- Each origin is a complete feed schema: `Origin = IdentityColumns ∪ DataColumns`.\n- A stream is a subset of that origin schema.\n- Every stream must contain all identity columns.\n- Every stream must contain a subset of data columns.\n- For streams of the same origin:\n    - identity columns may overlap,\n    - data columns must be pairwise disjoint,\n    - each data column belongs to exactly one stream.\n- Identity columns can overlap because every stream needs the same keys to identify and match rows.\n- Data columns must be disjoint because a stream is the unique diff history for its data columns.\n- Short rule: streams share keys, but not payload.\n\nSimple examples:\n- Valid split:\n    - Origin = `{id1, id2, data1, data2, data3, data4}`\n    - Stream `prices` = `{id1, id2, data1, data2}`\n    - Stream `stock` = `{id1, id2, data3, data4}`\n    - Valid because the identity columns are shared and the data columns do not overlap.\n- Invalid split:\n    - Stream `prices` = `{id1, id2, data1, data2}`\n    - Stream `stock` = `{id1, id2, data2, data3}`\n    - Invalid because `data2` appears in more than one stream.\n\nFallback to ordinary ingest:\n- If no previous file is resolved, ingest runs as ordinary ingest.\n- If previous file is resolved but previous CSV header cannot be read, ingest falls back to ordinary ingest.\n- If previous file is resolved but current and previous CSV headers do not match byte-for-byte, ingest falls back to ordinary ingest.\n- If the latest same-origin ingest overall has the opposite scope shape (`data_stream = null` vs non-null relative to current),\n  ingest falls back to ordinary ingest.\n- With `ignore_data_columns_header_diff=true`, those ordinary-ingest fallbacks are disabled for previous-file resolution and previous-header readability. Processing fails instead.\n\nAutomatic previous-file discovery details (when `prev_file_path` is not provided):\n1) Discovery runs only within the same `store_id`.\n2) If `data_origin` is omitted, scope-based candidate selection is skipped.\n3) Candidates are scanned from newest to oldest by created_at.\n4) Exhausted failed candidates are skipped before any opposite-scope or same-stream decision.\n5) If the first non-exhausted same-origin candidate has opposite scope shape (`data_stream = null` vs non-null relative to current),\n    current file runs as ordinary ingest only if that candidate has completed `file_ingestor`.\n    If that newer same-origin candidate is still pending, `file-imports.insert` fails with `422 prev_file_ingest_not_completed`\n    instead of skipping it and searching older same-scope history.\n6) If current file has `data_origin` and no `data_stream`, eligible same-scope candidates are previous origin-only files with equal `data_origin`.\n7) If current file has `data_origin` + `data_stream`, eligible same-scope candidates are previous files with equal `data_origin` and equal `data_stream`.\n    A different stream does not count as a diff baseline for the current stream.\n8) A discovered previous file used for differential ingest must have completed `file_ingestor` stage.\n9) If the newest non-exhausted same-origin candidate is still waiting to be processed,\n    `file-imports.insert` fails with `422 prev_file_ingest_not_completed`.\n10) If no usable candidate remains after exhausted candidates are skipped,\n    insert persists no previous file and ingest runs as ordinary ingest.\n11) With `ignore_data_columns_header_diff=true`, if no usable candidate remains after skipping candidates with unreadable headers,\n    insert fails with `422 ignore_data_columns_header_diff_requires_previous_file` instead of falling back to ordinary ingest.\n\nExplicit previous-file behavior:\n- If `prev_file_path` is provided, it must resolve to a file from the same store.\n- The resolved explicit file must have completed `file_ingestor` stage.\n- If the explicit file exists but has not completed `file_ingestor`, `file-imports.insert` fails with `422 prev_file_ingest_not_completed`.\n\nExample API calls (major no-fallback cases):\n1) No prev file + no origin -> ordinary ingest.\n- Request: `POST /api/v1/file-imports.insert`\n- Body: {\"file_path\":\"imports/store_<store_id>/2026_03/current.csv\"}\n- Previous file match: none, because both `prev_file_path` and `data_origin` are omitted.\n\n2) Explicit prev file -> differential ingest.\n- Request: `POST /api/v1/file-imports.insert`\n- Body: {\"file_path\":\"imports/store_<store_id>/2026_03/current.csv\",\"prev_file_path\":\"imports/store_<store_id>/2026_03/prev.csv\"}\n- Previous file match: exactly `prev_file_path` (same store), scope discovery is bypassed.\n\n3) `data_origin` + `data_stream` -> differential ingest.\n- Request: `POST /api/v1/file-imports.insert`\n- Body: {\"file_path\":\"imports/store_<store_id>/2026_03/current.csv\",\"data_origin\":\"supplier_a\",\"data_stream\":\"prices\"}\n- Previous file match: newest file in same store with equal `data_origin` and equal `data_stream` (`prices`) that has completed `file_ingestor`, unless a newer completed same-origin file has opposite scope shape.\n\nDiff vs ordinary ingest cases:\n- Diff is used:\n    - explicit `prev_file_path` resolves a same-store previous file,\n    - current file is origin-only and the latest same-origin ingest overall is also origin-only,\n    - current file is origin+stream, the latest same-origin ingest overall also has stream scope, and a same-stream baseline exists.\n- Ordinary ingest is used:\n    - no `prev_file_path` and no scope baseline is found,\n    - newest completed same-origin candidate has opposite scope shape (`data_stream = null` vs non-null relative to current),\n    - previous file exists but previous header cannot be read,\n    - previous file exists but headers do not match byte-for-byte,\n    - `row_reconcile_policy=delete_origin_except_source` intentionally disables row diffing for valid origin-only requests.\n- Insert is rejected before processing starts when:\n    - explicit `prev_file_path` exists but has not completed `file_ingestor`,\n    - newest non-exhausted same-origin candidate is still waiting to be processed, even if it has opposite scope shape.\n- Differential ingest is attempted but processing fails instead of falling back when current CSV header contains:\n    - both `Sku` and full composite key columns, or\n    - neither `Sku` nor full composite key columns.\n\nScope mismatch examples:\n- prev has `data_origin = A` and `data_stream = prices`, current has `data_origin = A` and `data_stream = null`.\nResult: ordinary ingest when that latest same-origin ingest has already completed `file_ingestor`. Current origin-only file does not skip that newer stream ingest and search older origin-only history.\n- prev has `data_origin = A` and `data_stream = null`, current has `data_origin = A` and `data_stream = prices`.\nResult: ordinary ingest when that latest same-origin ingest has already completed `file_ingestor`. The first stream file after a full-origin file has no valid stream baseline.\n\nReingest behavior for row data_origin:\n- Reingesting the same rows without `data_origin` sets ingested rows `data_origin` to null in products data.\n- Reingesting the same rows with a different `data_origin` overwrites products rows with the new `data_origin` value.\n- Because previous-file lookup is scope-based, changing or omitting `data_origin` may stop differential linkage to files from other scopes unless `prev_file_path` is explicitly provided.\n\nValidation rules:\n- invalid file_path (no file name or non-UTF-8 file name) returns 422.\n- data_stream without data_origin returns 422.\n- data_origin with prev_file_path is mutually exclusive and returns 422.\n- `row_reconcile_policy=delete_origin_except_source` without `data_origin` returns 422.\n- `row_reconcile_policy=delete_origin_except_source` with `data_stream` returns 422.\n- `ignore_data_columns_header_diff=true` without `prev_file_path` and without `data_origin` returns 422.\n- `ignore_data_columns_header_diff=true` with `row_reconcile_policy=keep_all` returns 422.\n- `ignore_data_columns_header_diff=true` with `row_reconcile_policy=delete_origin_except_source` returns 422.\n- prev_file_path must reference an existing file from the same store if not found returns 404.\n- prev_file_path that resolves to a file which has not completed `file_ingestor` returns 422.\n- the newest non-exhausted same-origin previous file candidate that is still waiting to be processed returns 422.\n- Differential CSV key validation is performed during file processing (not in this insert request):\n    when differential ingest is attempted, current CSV header must contain exactly one strategy:\n    `Sku` or full composite key (`Brand`, `PartNumber`, `CrossReferenceBrand`, `CrossReferencePartNumbers`).\n    If both or neither are present, file-ingestor logs a header issue and marks the file with processing error stats.\n\nNotes:\n- data_origin/data_stream are caller-provided scope identifiers.\n- data_source is system-derived from ingest source metadata and is not a request field.\n- duplicate file_path for the same store is treated as an internal error path (current behavior).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.FileInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.FileInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.FileImportsInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/file-imports.issues.list":{"description":"Paginated list of all issues in specific file","post":{"operationId":"file-imports.issues.list","tags":["Ingest"],"description":"Paginated list of all issues in specific file","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.GetFileIssuesRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<ingest.FileImportEntityIssue>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.FileImportEntityIssue"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.FileImportsIssuesListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/file-imports.list":{"description":"Paginated list of last N imported files","post":{"operationId":"file-imports.list","tags":["Ingest"],"description":"Paginated list of last N imported files","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<ingest.FileImportEntity>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.FileImportEntity"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.FileImportsListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/gapc-brands.get":{"description":"Endpoint for getting data about a specific brand","post":{"operationId":"gapc-brands.get","tags":["OpenBase"],"description":"Endpoint for getting data about a specific brand","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseGetBrandRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseGetBrandResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/gapc-part-types.get":{"description":"Endpoint for getting data about a specific part type","post":{"operationId":"gapc-part-types.get","tags":["OpenBase"],"description":"Endpoint for getting data about a specific part type","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseGetPartTypeDataRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseGetPartTypeDataResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/gapc-properties.lookup":{"description":"Data Lookup API for GAPC properties","post":{"operationId":"gapc-properties.lookup","tags":["Lookup"],"description":"Data Lookup API for GAPC properties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.GapcPropertiesLookupRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.GapcPropertiesLookupResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.LookupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ghca.classification.search":{"description":"Search for GHCA relations by classification links","post":{"operationId":"ghca.classification.search","tags":["tier1"],"description":"Search for GHCA relations by classification links","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaClassificationSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaClassificationSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ghca.classification.snapshot.get":{"description":"The whole GHCA classification tree in one language, versioned so clients can keep a copy","post":{"operationId":"ghca.classification.snapshot.get","tags":["tier1"],"description":"The whole GHCA classification tree in one language, versioned so clients can keep a copy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaClassificationSnapshotRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaClassificationSnapshotResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ghca.refresh":{"description":"Manually refresh the GHCA tree from the database (Partly staff only)","post":{"operationId":"ghca.refresh","tags":["tier1"],"description":"Manually refresh the GHCA tree from the database (Partly staff only)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaRefreshRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaRefreshResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ghca.search":{"description":"Search for GHCA relations by spatial links","post":{"operationId":"ghca.search","tags":["tier1"],"description":"Search for GHCA relations by spatial links","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaSpatialSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaSpatialSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GhcaSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/groups.insert":{"description":"Creates a new user group. The group starts with no members.\nRestricted to organization admins and users with the `partly_staff` permission.","post":{"operationId":"groups.insert","tags":["Authentication"],"description":"Creates a new user group. The group starts with no members.\nRestricted to organization admins and users with the `partly_staff` permission.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_insert.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_insert.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_insert.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/groups.list":{"description":"Lists the groups the caller is a member of. Set `with_membership` to `false` to list every group of the caller's organization.","post":{"operationId":"groups.list","tags":["Authentication"],"description":"Lists the groups the caller is a member of. Set `with_membership` to `false` to list every group of the caller's organization.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_list.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"NonPaginatedList<auth.GroupModel>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.GroupModel"}}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_list.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/groups.members.insert":{"description":"Inserts a new user member to a group.\nThe current user should have admin priviligies for the group.\nThe user being added should be a member of the same organization as the current user.","post":{"operationId":"groups.members.insert","tags":["Authentication"],"description":"Inserts a new user member to a group.\nThe current user should have admin priviligies for the group.\nThe user being added should be a member of the same organization as the current user.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_members_insert.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_members_insert.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/groups.members.list":{"description":"Lists all members of a group.\nThe current user should have admin priviligies for the group","post":{"operationId":"groups.members.list","tags":["Authentication"],"description":"Lists all members of a group.\nThe current user should have admin priviligies for the group","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_members_list.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<auth.GroupMemberModel>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.GroupMemberModel"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_members_list.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/groups.members.remove":{"description":"Removes a member from a group.\nThe current user should have admin priviligies for the group.\nRemoving the last member is allowed; the group is left empty.","post":{"operationId":"groups.members.remove","tags":["Authentication"],"description":"Removes a member from a group.\nThe current user should have admin priviligies for the group.\nRemoving the last member is allowed; the group is left empty.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_members_remove.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_members_remove.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/groups.remove":{"description":"Removes a user group.\nThe current user should have admin priviligies for the group.\nThe group should not be used anywhere.\nAdmin group for organization or business cannot be removed.","post":{"operationId":"groups.remove","tags":["Authentication"],"description":"Removes a user group.\nThe current user should have admin priviligies for the group.\nThe group should not be used anywhere.\nAdmin group for organization or business cannot be removed.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_remove.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_remove.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/groups.update":{"description":"Updates the existing user group. The current user should have admin priviligies for the group.","post":{"operationId":"groups.update","tags":["Authentication"],"description":"Updates the existing user group. The current user should have admin priviligies for the group.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_update.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.groups_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/incentive.leaderboard.get":{"description":"Get incentive leaderboard","post":{"operationId":"incentive.leaderboard.get","tags":["Incentive"],"description":"Get incentive leaderboard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.LeaderboardGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.LeaderboardGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.LeaderboardGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/incentive.standings.get":{"description":"Get incentive standings for the authenticated repairer's sites","post":{"operationId":"incentive.standings.get","tags":["Incentive"],"description":"Get incentive standings for the authenticated repairer's sites","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.StandingsGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.StandingsGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.StandingsGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/incentive.workshop.standings.get":{"description":"Get workshop promotion standings for the authenticated repairer's sites","post":{"operationId":"incentive.workshop.standings.get","tags":["Incentive"],"description":"Get workshop promotion standings for the authenticated repairer's sites","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.WorkshopStandingsGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.WorkshopStandingsGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incentive.WorkshopStandingsGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/insurers.verify":{"description":"Validates authorization header and its relation to an insurer account","post":{"operationId":"insurers.verify","tags":["Authentication"],"description":"Validates authorization header and its relation to an insurer account","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.InsurersVerifyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_repairer.InsurerAuthorizationDetails"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.InsurersVerifyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integration-schemas.list":{"description":"Lists currently visible integration schemas","post":{"operationId":"integration-schemas.list","tags":["Integrations"],"description":"Lists currently visible integration schemas","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/integration.IntegrationSchema"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.authorize":{"description":"When an OAuth integration is installed, they will direct the user to the OAuth Authorize page. From there, when the user accepts the installation.\nintegrations.authorize is called from the acceptance page and will generate an access code that will be redirected to the integrations authorizationURL.\nFrom there, the integration is able to exchange the access code for an OAuth Authorization token for future use.\n\nAn integration can only have one of Repairer or Supplier scope in this iteration. Attempting to have either without their respective business will result in an Invalid Scopes error\nas well as attempting to have both in the same integration. An integration must also have atleast one scope. All of these are limitations of the current integrations table.","post":{"operationId":"integrations.authorize","tags":["Integrations"],"description":"When an OAuth integration is installed, they will direct the user to the OAuth Authorize page. From there, when the user accepts the installation.\nintegrations.authorize is called from the acceptance page and will generate an access code that will be redirected to the integrations authorizationURL.\nFrom there, the integration is able to exchange the access code for an OAuth Authorization token for future use.\n\nAn integration can only have one of Repairer or Supplier scope in this iteration. Attempting to have either without their respective business will result in an Invalid Scopes error\nas well as attempting to have both in the same integration. An integration must also have atleast one scope. All of these are limitations of the current integrations table.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsAuthorizeRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsAuthorizeResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsAuthorizeError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.get":{"description":"Endpoint for getting data about a specific integration","post":{"operationId":"integrations.get","tags":["Integrations"],"description":"Endpoint for getting data about a specific integration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationIdentity"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.Integration"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.insert":{"description":"Endpoint for installing an integration. The response may be a redirect, a schema to be completed by UI or the installed integration.","post":{"operationId":"integrations.insert","tags":["Integrations"],"description":"Endpoint for installing an integration. The response may be a redirect, a schema to be completed by UI or the installed integration.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.InsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.InsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.list":{"description":"List the integrations installed for the caller's business (supplier or repairer)","post":{"operationId":"integrations.list","tags":["Integrations"],"description":"List the integrations installed for the caller's business (supplier or repairer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.microsoft-graph-mail.authorize":{"description":"Begin Microsoft 365 admin-consent onboarding for the caller's org; returns a shareable Microsoft admin-consent link.","post":{"operationId":"integrations.microsoft-graph-mail.authorize","tags":["Integrations"],"description":"Begin Microsoft 365 admin-consent onboarding for the caller's org; returns a shareable Microsoft admin-consent link.","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/microsoft_graph_onboarding.InitiateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/microsoft_graph_onboarding.InitiateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.microsoft-graph-mail.update":{"description":"Update the send and/or read mailbox of the caller's org's installed Microsoft 365 mail integration.","post":{"operationId":"integrations.microsoft-graph-mail.update","tags":["Integrations"],"description":"Update the send and/or read mailbox of the caller's org's installed Microsoft 365 mail integration.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/microsoft_graph_onboarding.UpdateMailboxesRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/microsoft_graph_onboarding.UpdateMailboxesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.remove":{"description":"Deletes the integration","post":{"operationId":"integrations.remove","tags":["Integrations"],"description":"Deletes the integration","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/integration.IntegrationIdentity"},{"type":"object","title":"nomatches.RemoveOrElse<integration.IntegrationIdentity, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/integration.Integration"}]}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.signin":{"description":"Triggers the login flow for an integration. A notification will be sent to the integration, allowing it to make authenticated requests by caching the login credentials","post":{"operationId":"integrations.signin","tags":["Integrations"],"description":"Triggers the login flow for an integration. A notification will be sent to the integration, allowing it to make authenticated requests by caching the login credentials","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.SigninRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationSigninError"}}}}}}},"/api/v1/integrations.update":{"description":"Allows an integration to modify its own integration parameters","post":{"operationId":"integrations.update","tags":["Integrations"],"description":"Allows an integration to modify its own integration parameters","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.UpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.Integration"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/integrations.v2.insert":{"description":"When a user is installing an integration they will receive an access code from integrations.authorize. The integration is then able to call\nintegrations.insert.v2 to fetch a long lived API key with the permissions accepted by the user.","post":{"operationId":"integrations.v2.insert","tags":["Integrations"],"description":"When a user is installing an integration they will receive an access code from integrations.authorize. The integration is then able to call\nintegrations.insert.v2 to fetch a long lived API key with the permissions accepted by the user.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsInsertV2Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsInsertV2Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsInsertV2Error"}}}}}}},"/api/v1/integrations.v2.signin":{"description":"Integrations Server can call this endpoint to exchange an API token for a short lived JWT token that matches the integrations permissions","post":{"operationId":"integrations.v2.signin","tags":["Integrations"],"description":"Integrations Server can call this endpoint to exchange an API token for a short lived JWT token that matches the integrations permissions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsSigninV2Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsV2SigninResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationsSigninV2Error"}}}}}}},"/api/v1/jobs.assessments.request":{"description":"Request an assessment for a job","post":{"operationId":"jobs.assessments.request","tags":["Job"],"description":"Request an assessment for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/job.RequestedAssessment"},{"type":"object","title":"IdentityData<job.JobIdentity, job.RequestedAssessment>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.attention.count":{"description":"Count the jobs needing attention across a repairer's sites","post":{"operationId":"jobs.attention.count","tags":["Job"],"description":"Count the jobs needing attention across a repairer's sites","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionCountRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionCountResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.attention.items.acknowledge":{"description":"Mark attention items as seen by the calling user","post":{"operationId":"jobs.attention.items.acknowledge","tags":["Job"],"description":"Mark attention items as seen by the calling user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionAcknowledgeRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionAcknowledgeResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.attention.items.close":{"description":"Resolve attention items site-wide","post":{"operationId":"jobs.attention.items.close","tags":["Job"],"description":"Resolve attention items site-wide","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionCloseRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionCloseResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.attention.items.list":{"description":"List open attention items for the given jobs","post":{"operationId":"jobs.attention.items.list","tags":["Job"],"description":"List open attention items for the given jobs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionItemsListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.AttentionItemsListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.baskets.get":{"description":"Get a job basket by ID","post":{"operationId":"jobs.baskets.get","tags":["Job"],"description":"Get a job basket by ID","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.BasketsGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Basket"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.baskets.insert":{"description":"Insert a new job basket","post":{"operationId":"jobs.baskets.insert","tags":["Job"],"description":"Insert a new job basket","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<job.JobIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Basket"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.baskets.latest.get":{"description":"Get the latest job basket for a job","post":{"operationId":"jobs.baskets.latest.get","tags":["Job"],"description":"Get the latest job basket for a job","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<job.JobIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.Basket"}]}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.baskets.list":{"description":"List all job baskets for a job","post":{"operationId":"jobs.baskets.list","tags":["Job"],"description":"List all job baskets for a job","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<job.JobIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.Basket"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.baskets.update":{"description":"Update an existing job basket","post":{"operationId":"jobs.baskets.update","tags":["Job"],"description":"Update an existing job basket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.BasketsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Basket"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.close":{"description":"Close a job","post":{"operationId":"jobs.close","tags":["Job"],"description":"Close a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/job.ClosingReason"},{"type":"object","title":"IdentityData<job.JobIdentity, job.ClosingReason>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.confirm":{"description":"Confirm a job estimation","post":{"operationId":"jobs.confirm","tags":["Job"],"description":"Confirm a job estimation","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/job.EstimationConfirmation"},{"type":"object","title":"IdentityData<job.JobIdentity, job.EstimationConfirmation>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.external.insert":{"description":"Insert a new Job from an external source","post":{"operationId":"jobs.external.insert","tags":["Job"],"description":"Insert a new Job from an external source","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/job.ExternalInsert"},{"type":"object","title":"IdentityData<job.JobIdentity, job.ExternalInsert>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<job.JobIdentity, job.ExternalInsert>, IfExistsUpdate>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsUpdate>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsUpdate"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.get":{"description":"Get a job by ID","post":{"operationId":"jobs.get","tags":["Job"],"description":"Get a job by ID","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<job.JobIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.get-many":{"description":"Get jobs by id, within the caller's sites","post":{"operationId":"jobs.get-many","tags":["Job"],"description":"Get jobs by id, within the caller's sites","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.GetManyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.GetManyResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.help.request":{"description":"Request help for a job","post":{"operationId":"jobs.help.request","tags":["Job"],"description":"Request help for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/job.RequestHelpData"},{"type":"object","title":"IdentityData<job.JobIdentity, job.RequestHelpData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.insert":{"description":"Insert a new job","post":{"operationId":"jobs.insert","tags":["Job"],"description":"Insert a new job","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.InsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.interpretation.finalize":{"description":"Complete a job interpretation","post":{"operationId":"jobs.interpretation.finalize","tags":["Job"],"description":"Complete a job interpretation","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<job.JobIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.interpretation.request":{"description":"Request a job interpretation","post":{"operationId":"jobs.interpretation.request","tags":["Job"],"description":"Request a job interpretation","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<job.JobIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.parts.insert":{"description":"Insert parts for a job","post":{"operationId":"jobs.parts.insert","tags":["Job"],"description":"Insert parts for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/job.PartInsertRequestData"},{"type":"object","title":"IdentityData<job.JobIdentity, job.PartInsertRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]},{"type":"object","title":"nomatches.InsertManyOrElse<IdentityData<job.JobIdentity, job.PartInsertRequestData>, IfExistsReplaceAll>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsertMany<IfExistsReplaceAll>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsReplaceAll"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.PartInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.parts.list":{"description":"List parts for a job","post":{"operationId":"jobs.parts.list","tags":["Job"],"description":"List parts for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/job.PartListRequestData"},{"type":"object","title":"IdentityData<job.JobIdentity, job.PartListRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.PartListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.remove":{"description":"Remove a job","post":{"operationId":"jobs.remove","tags":["Job"],"description":"Remove a job","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<job.JobIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.search":{"description":"Search for a job by ID","post":{"operationId":"jobs.search","tags":["Job"],"description":"Search for a job by ID","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.SearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.SearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.update":{"description":"Update an existing job","post":{"operationId":"jobs.update","tags":["Job"],"description":"Update an existing job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/job.UpdateRequestData"},{"type":"object","title":"IdentityData<job.JobIdentity, job.UpdateRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<job.JobIdentity, job.UpdateRequestData>, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbort>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.v2.search":{"description":"Searches a repairer's or work provider's jobs with optional supply and part counts, a count filter, and a total across the whole matching set. `supply` is present when `facts` names `supply` or a predicate names a `suppliers_*` count; `parts` likewise for `parts` and `part_total`. `covered` and `uncovered` are always null.","post":{"operationId":"jobs.v2.search","tags":["Job"],"description":"Searches a repairer's or work provider's jobs with optional supply and part counts, a count filter, and a total across the whole matching set. `supply` is present when `facts` names `supply` or a predicate names a `suppliers_*` count; `parts` likewise for `parts` and `part_total`. `covered` and `uncovered` are always null.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jobs_v2.SearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jobs_v2.SearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/jobs_v2.SearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/jobs.vehicles.insert":{"description":"Insert a vehicle for a job","post":{"operationId":"jobs.vehicles.insert","tags":["Job"],"description":"Insert a vehicle for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/job.VehicleInsert"},{"type":"object","title":"IdentityData<job.JobIdentity, job.VehicleInsert>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<job.JobIdentity, job.VehicleInsert>, IfExistsReplace>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsReplace>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsReplace"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Job"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/job.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.attachments.get":{"description":"Presigned GET URL for an existing attachment","post":{"operationId":"messaging.attachments.get","tags":["Messaging"],"description":"Presigned GET URL for an existing attachment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.AttachmentUrlRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.AttachmentUrlResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.AttachmentUrlError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.attachments.prepare":{"description":"Allocate presigned PUT URLs for attachments","post":{"operationId":"messaging.attachments.prepare","tags":["Messaging"],"description":"Allocate presigned PUT URLs for attachments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.AttachmentsPrepareRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.AttachmentsPrepareResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.AttachmentsPrepareError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.conversations.get":{"description":"Fetch a conversation + its active participants","post":{"operationId":"messaging.conversations.get","tags":["Messaging"],"description":"Fetch a conversation + its active participants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.conversations.insert":{"description":"Start a new conversation on a resource","post":{"operationId":"messaging.conversations.insert","tags":["Messaging"],"description":"Start a new conversation on a resource","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.conversations.participants.insert":{"description":"Add a business participant to a conversation","post":{"operationId":"messaging.conversations.participants.insert","tags":["Messaging"],"description":"Add a business participant to a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ParticipantAddRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ParticipantAddResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ParticipantAddError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.conversations.participants.remove":{"description":"Remove a business participant from a conversation","post":{"operationId":"messaging.conversations.participants.remove","tags":["Messaging"],"description":"Remove a business participant from a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ParticipantRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ParticipantRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.conversations.search":{"description":"List conversations the caller can read","post":{"operationId":"messaging.conversations.search","tags":["Messaging"],"description":"List conversations the caller can read","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.conversations.update":{"description":"Update a conversation (archive / restore)","post":{"operationId":"messaging.conversations.update","tags":["Messaging"],"description":"Update a conversation (archive / restore)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ConversationUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.insert":{"description":"Post a message to a conversation","post":{"operationId":"messaging.messages.insert","tags":["Messaging"],"description":"Post a message to a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.list":{"description":"Paged list of messages in a conversation","post":{"operationId":"messaging.messages.list","tags":["Messaging"],"description":"Paged list of messages in a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.reactions.insert":{"description":"Add a reaction to a message","post":{"operationId":"messaging.messages.reactions.insert","tags":["Messaging"],"description":"Add a reaction to a message","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReactionAddRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageReaction"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReactionAddError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.reactions.remove":{"description":"Remove a reaction from a message","post":{"operationId":"messaging.messages.reactions.remove","tags":["Messaging"],"description":"Remove a reaction from a message","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReactionRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReactionRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.remove":{"description":"Soft-delete a message (sender only)","post":{"operationId":"messaging.messages.remove","tags":["Messaging"],"description":"Soft-delete a message (sender only)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.search":{"description":"Full-text search across message bodies","post":{"operationId":"messaging.messages.search","tags":["Messaging"],"description":"Full-text search across message bodies","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.stream":{"description":"SSE stream of conversation snapshots","post":{"operationId":"messaging.messages.stream","tags":["Messaging"],"description":"SSE stream of conversation snapshots","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesStreamRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/messaging.MessagesStreamFrame"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessagesStreamError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.messages.update":{"description":"Edit a message body (sender only)","post":{"operationId":"messaging.messages.update","tags":["Messaging"],"description":"Edit a message body (sender only)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.MessageUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.read-state.get":{"description":"Unread counts across conversations","post":{"operationId":"messaging.read-state.get","tags":["Messaging"],"description":"Unread counts across conversations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReadStateGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReadStateGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReadStateGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.read-state.update":{"description":"Advance the caller's read cursor on a conversation","post":{"operationId":"messaging.read-state.update","tags":["Messaging"],"description":"Advance the caller's read cursor on a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReadStateUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReadStateUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.ReadStateUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.subscriptions.insert":{"description":"Subscribe the caller to loud notifications","post":{"operationId":"messaging.subscriptions.insert","tags":["Messaging"],"description":"Subscribe the caller to loud notifications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.SubscriptionAddRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.Subscription"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.SubscriptionAddError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.subscriptions.list":{"description":"List the caller's subscriptions","post":{"operationId":"messaging.subscriptions.list","tags":["Messaging"],"description":"List the caller's subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.SubscriptionsListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.SubscriptionsListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.SubscriptionsListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.subscriptions.remove":{"description":"Unsubscribe the caller from loud notifications","post":{"operationId":"messaging.subscriptions.remove","tags":["Messaging"],"description":"Unsubscribe the caller from loud notifications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.SubscriptionRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.SubscriptionRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/messaging.typing.publish":{"description":"Broadcast an ephemeral typing event on a conversation","post":{"operationId":"messaging.typing.publish","tags":["Messaging"],"description":"Broadcast an ephemeral typing event on a conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.TypingBroadcastRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messaging.TypingBroadcastError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.ai-video-analysis.get":{"description":"Analyses a repair video (plus optional job context) into recommended damaged parts, a damage summary, and the most collision-relevant key frames.","post":{"operationId":"ml.ai-video-analysis.get","tags":["ML"],"description":"Analyses a repair video (plus optional job context) into recommended damaged parts, a damage summary, and the most collision-relevant key frames.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VideoAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.VideoAnalysisResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.VideoAnalysisResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.auto-estimate-image-selection.get":{"description":"Scores a job's photos for collision-damage relevance and returns the most diagnostic ones, each with a short damage description and a 0-100 relevance score. Use to narrow a large photo set down to the images worth analysing.","post":{"operationId":"ml.auto-estimate-image-selection.get","tags":["ML"],"description":"Scores a job's photos for collision-damage relevance and returns the most diagnostic ones, each with a short damage description and a 0-100 relevance score. Use to narrow a large photo set down to the images worth analysing.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.JobContextSelectionRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.JobContextSelectionResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.JobContextSelectionResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.auto-estimate-oem-parts.get":{"description":"Maps generic damaged-part names and per-image damage descriptions onto the vehicle's OEM parts catalogue and diagrams, returning matched OEM parts (with supporting hardware kits) and the most relevant diagrams per image.","post":{"operationId":"ml.auto-estimate-oem-parts.get","tags":["ML"],"description":"Maps generic damaged-part names and per-image damage descriptions onto the vehicle's OEM parts catalogue and diagrams, returning matched OEM parts (with supporting hardware kits) and the most relevant diagrams per image.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.OemMappingRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.OemMappingResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.OemMappingResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.auto-estimate-pipeline.get":{"description":"Runs the full auto-estimate pipeline (image selection, damaged-parts analysis, and OEM mapping) in one call. Realtime runs steps 1-3 synchronously; background enqueues a job and returns immediately. Empty diagrams skips OEM mapping.","post":{"operationId":"ml.auto-estimate-pipeline.get","tags":["ML"],"description":"Runs the full auto-estimate pipeline (image selection, damaged-parts analysis, and OEM mapping) in one call. Realtime runs steps 1-3 synchronously; background enqueues a job and returns immediately. Empty diagrams skips OEM mapping.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AiPipelineRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.AiPipelineResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.AiPipelineResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.auto-estimate-raw-parts.get":{"description":"Analyses vehicle photos (plus optional job text/audio) into a flat list of likely-damaged parts using generic part names, each with a damage reason, severity, and a repair-or-replace recommendation. Output is not tied to any OEM catalogue.","post":{"operationId":"ml.auto-estimate-raw-parts.get","tags":["ML"],"description":"Analyses vehicle photos (plus optional job text/audio) into a flat list of likely-damaged parts using generic part names, each with a damage reason, severity, and a repair-or-replace recommendation. Output is not tied to any OEM catalogue.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DamagedPartsAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.DamagedPartsAnalysisResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.DamagedPartsAnalysisResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.auto-estimate.v2.get":{"description":"Fetch (and on a cache miss, trigger) queued AI estimation pipeline results for a job. Poll while steps report in_progress.","post":{"operationId":"ml.auto-estimate.v2.get","tags":["AutoEstimate"],"description":"Fetch (and on a cache miss, trigger) queued AI estimation pipeline results for a job. Poll while steps report in_progress.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.AutoEstimateGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.AutoEstimateGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.AutoEstimateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.automatch.v1.get":{"description":"Fetch (and on a cache miss, trigger) automatch results for a vehicle's free-text part lines. Poll while queries report in_progress.","post":{"operationId":"ml.automatch.v1.get","tags":["Automatch"],"description":"Fetch (and on a cache miss, trigger) automatch results for a vehicle's free-text part lines. Poll while queries report in_progress.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.AutomatchGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.AutomatchGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.AutomatchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.diagram-categories.get":{"description":"Endpoint for predicting diagram categories.","post":{"operationId":"ml.diagram-categories.get","tags":["ML"],"description":"Endpoint for predicting diagram categories.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramCategoryPredictionRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.DiagramCategoryPredictionResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.DiagramCategoryPredictionResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.diagram-variants.get":{"description":"Endpoint for identifying diagram variants.","post":{"operationId":"ml.diagram-variants.get","tags":["ML"],"description":"Endpoint for identifying diagram variants.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramVariantIdentificationRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.DiagramVariantIdentificationResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.DiagramVariantIdentificationResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.embedding-search.get":{"description":"Endpoint for performing an embedding search.","post":{"operationId":"ml.embedding-search.get","tags":["ML"],"description":"Endpoint for performing an embedding search.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.SearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.SearchResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.SearchResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.job-context-diagram-correlations.get":{"description":"Endpoint for mapping job context (images/text) to OEM diagrams and parts.","post":{"operationId":"ml.job-context-diagram-correlations.get","tags":["ML"],"description":"Endpoint for mapping job context (images/text) to OEM diagrams and parts.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.JobContextToDiagramPartRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.JobContextToDiagramPartResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.JobContextToDiagramPartResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/ml.part-list-extraction.get":{"description":"Endpoint for extracting a part list from media.","post":{"operationId":"ml.part-list-extraction.get","tags":["ML"],"description":"Endpoint for extracting a part list from media.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.PartListExtractionRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.PartListExtractionResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.PartListExtractionResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.predict-raw-to-hca.get":{"description":"Endpoint for predicting raw description to HCA.","post":{"operationId":"ml.predict-raw-to-hca.get","tags":["ML"],"description":"Endpoint for predicting raw description to HCA.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.R2hRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.R2hResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.R2hResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.recommend-parts.get":{"description":"Endpoint for recommending parts.","post":{"operationId":"ml.recommend-parts.get","tags":["ML"],"description":"Endpoint for recommending parts.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.RecommendationRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.RecommendationResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.RecommendationResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.repair-methods.lookup":{"description":"Retrieves applicable, cited repair-method evidence for an authorised job.","post":{"operationId":"ml.repair-methods.lookup","tags":["ML"],"description":"Retrieves applicable, cited repair-method evidence for an authorised job.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.RepairMethodLookupRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.RepairMethodLookupResult"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.RepairMethodLookupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/ml.segments.get":{"description":"Endpoint for identifying segments in a diagram.","post":{"operationId":"ml.segments.get","tags":["ML"],"description":"Endpoint for identifying segments in a diagram.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.GenericPredictionRequestVisionAnnotationBulkInputAnnotatedUnionVertexVisionAnnotationConfigStaticVisionAnnotationConfigRealtimeVisionAnnotationConfigBackgroundVisionAnnotationConfigRealtimeSyncVisionAnnotationConfigSymbolTextVisionAnnotationConfigRealtimeSupplierVisionAnnotationConfigLineBoxObbVisionAnnotationConfigPncocrVisionAnnotationConfigPncVisionAnnotationConfigStyleTransferPostProcessVisionAnnotationConfigStyleTransferLineBoxVisionAnnotationConfigFieldInfoAnnotationNoneTypeRequiredTrueDiscriminatorStrategy"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.BulkVisionAnnotationResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.BulkVisionAnnotationResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/network-validation.connections.list":{"description":"Lists every connection registered against a violation code. Partly staff only.","post":{"operationId":"network-validation.connections.list","tags":["Network Validation"],"description":"Lists every connection registered against a violation code. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_connections_list.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_connections_list.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_connections_list.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/network-validation.connections.update":{"description":"Inserts and removes the tag-to-tag connections a violation definition reads. The source tag names one side of the expected relationship and the target the other. Partly staff only.","post":{"operationId":"network-validation.connections.update","tags":["Network Validation"],"description":"Inserts and removes the tag-to-tag connections a violation definition reads. The source tag names one side of the expected relationship and the target the other. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_connections_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_connections_update.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_connections_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/network-validation.violations.search":{"description":"List recorded violations. Partly staff only.","post":{"operationId":"network-validation.violations.search","tags":["Network Validation"],"description":"List recorded violations. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_search.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<network_validation.NetworkViolation>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/network_validation.NetworkViolation"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_search.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/network-validation.violations.update":{"description":"Act on one recorded violation, or on an organization and violation code. `re_verify` re-runs the validation and closes violations that no longer hold; `ignore` closes them without remediation. Targeting an organization is the only way to reach a validation that has recorded nothing for it yet. Partly staff only.","post":{"operationId":"network-validation.violations.update","tags":["Network Validation"],"description":"Act on one recorded violation, or on an organization and violation code. `re_verify` re-runs the validation and closes violations that no longer hold; `ignore` closes them without remediation. Targeting an organization is the only way to reach a validation that has recorded nothing for it yet. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_update.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/network-validation.violations.update-many":{"description":"Act on many violations at once. `re_verify` re-runs each affected organization's validation once for the whole batch; `ignore` closes them all without remediation. Partly staff only.","post":{"operationId":"network-validation.violations.update-many","tags":["Network Validation"],"description":"Act on many violations at once. `re_verify` re-runs each affected organization's validation once for the whole batch; `ignore` closes them all without remediation. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_update_many.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_update_many.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/network_validation_violations_update_many.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/notifications.acknowledge":{"description":"Mark one or more notifications as acknowledged","post":{"operationId":"notifications.acknowledge","tags":["Notifications"],"description":"Mark one or more notifications as acknowledged","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationAcknowledgeRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationAcknowledgeResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationAcknowledgeError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/notifications.count":{"description":"Return the current counts for notifications","post":{"operationId":"notifications.count","tags":["Notifications"],"description":"Return the current counts for notifications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationCountRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationCountResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationCountError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/notifications.list":{"description":"List notifications for a user","post":{"operationId":"notifications.list","tags":["Notifications"],"description":"List notifications for a user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notification.NotificationListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-collection.cancel":{"description":"Cancel an offer collection session","post":{"operationId":"offer-collection.cancel","tags":["Offer Collection"],"description":"Cancel an offer collection session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CancelRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CancelResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CancelError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-collection.continue-search.request":{"description":"Continue a stopped offer collection session with a new time window","post":{"operationId":"offer-collection.continue-search.request","tags":["Offer Collection"],"description":"Continue a stopped offer collection session with a new time window","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ContinueSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ContinueSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ContinueSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-collection.evaluate":{"description":"Get current session state and stopping condition evaluation (read-only)","post":{"operationId":"offer-collection.evaluate","tags":["Offer Collection"],"description":"Get current session state and stopping condition evaluation (read-only)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CheckRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CheckResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.EvaluateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-collection.get":{"description":"Get an offer collection session with audit trail","post":{"operationId":"offer-collection.get","tags":["Offer Collection"],"description":"Get an offer collection session with audit trail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.GetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.GetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-collection.insert":{"description":"Create an offer collection session","post":{"operationId":"offer-collection.insert","tags":["Offer Collection"],"description":"Create an offer collection session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CreateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CreateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.CreateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-collection.list":{"description":"List all offer collection sessions for a job","post":{"operationId":"offer-collection.list","tags":["Offer Collection"],"description":"List all offer collection sessions for a job","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-collection.update":{"description":"Add stopping conditions or re-activate a stopped session","post":{"operationId":"offer-collection.update","tags":["Offer Collection"],"description":"Add stopping conditions or re-activate a stopped session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ExtendRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.ExtendResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_collect_engine.UpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-requests.get":{"description":"Get an offer request","post":{"operationId":"offer-requests.get","tags":["Offer Requests"],"description":"Get an offer request","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.OfferRequest"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.off-network-email-preview.get":{"description":"Preview the resolved email addresses for an off-network supplier order before sending","post":{"operationId":"offer-requests.off-network-email-preview.get","tags":["Offer Requests"],"description":"Preview the resolved email addresses for an off-network supplier order before sending","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.OffNetworkEmailPreviewRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.OffNetworkEmailPreviewResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-requests.requests.close":{"description":"Close offer requests for a job","post":{"operationId":"offer-requests.requests.close","tags":["Offer Requests"],"description":"Close offer requests for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/offer_request.RequestsCloseRequestData"},{"type":"object","title":"IdentityData<job.JobIdentity, offer_request.RequestsCloseRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.RequestsCloseResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.requests.events.insert":{"description":"Insert repairer events for offer requests on a job","post":{"operationId":"offer-requests.requests.events.insert","tags":["Offer Requests"],"description":"Insert repairer events for offer requests on a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/offer_request.RequestsEventsInsertRequestData"},{"type":"object","title":"IdentityData<job.JobIdentity, offer_request.RequestsEventsInsertRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.RequestsEventsInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.requests.insert":{"description":"Insert offer requests for a job","post":{"operationId":"offer-requests.requests.insert","tags":["Offer Requests"],"description":"Insert offer requests for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/offer_request.RequestsInsertRequestData"},{"type":"object","title":"IdentityData<job.JobIdentity, offer_request.RequestsInsertRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.RequestsInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.requests.list":{"description":"List offer requests for a job","post":{"operationId":"offer-requests.requests.list","tags":["Offer Requests"],"description":"List offer requests for a job","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/offer_request.RequestsListRequestData"},{"type":"object","title":"IdentityData<job.JobIdentity, offer_request.RequestsListRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/job.JobIdentity"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.RequestsListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.search":{"description":"Search offer requests","post":{"operationId":"offer-requests.search","tags":["Offer Requests"],"description":"Search offer requests","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.SearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.SearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.supplier-events.insert":{"description":"Insert a supplier event","post":{"operationId":"offer-requests.supplier-events.insert","tags":["Offer Requests"],"description":"Insert a supplier event","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/offer_request.SupplierEventInsertData"},{"type":"object","title":"IdentityData<uuid.Uuid, offer_request.SupplierEventInsertData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.supplier-unread.count":{"description":"Get unread offer requests for a supplier","post":{"operationId":"offer-requests.supplier-unread.count","tags":["Offer Requests"],"description":"Get unread offer requests for a supplier","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/i64"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.supplier-users.insert":{"description":"Insert assigned users","post":{"operationId":"offer-requests.supplier-users.insert","tags":["Offer Requests"],"description":"Insert assigned users","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/offer_request.UsersInsertRequestData"},{"type":"object","title":"IdentityData<uuid.Uuid, offer_request.UsersInsertRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.OfferRequest"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-requests.supplier-users.remove":{"description":"Remove assigned users","post":{"operationId":"offer-requests.supplier-users.remove","tags":["Offer Requests"],"description":"Remove assigned users","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/offer_request.UsersRemoveRequestData"},{"type":"object","title":"IdentityData<uuid.Uuid, offer_request.UsersRemoveRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.OfferRequest"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_request.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-rules.categories.get":{"description":"Fetch a single insurer category with its full HCA list.","post":{"operationId":"offer-rules.categories.get","tags":["offer-rules"],"description":"Fetch a single insurer category with its full HCA list.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.GetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.GetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.categories.insert":{"description":"Create a new insurer category (staff only).","post":{"operationId":"offer-rules.categories.insert","tags":["offer-rules"],"description":"Create a new insurer category (staff only).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.InsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.InsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.InsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.categories.list":{"description":"List all insurer categories (summary only, no HCA lists). Use categories.get for the HCA membership of a single category.","post":{"operationId":"offer-rules.categories.list","tags":["offer-rules"],"description":"List all insurer categories (summary only, no HCA lists). Use categories.get for the HCA membership of a single category.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.ListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.ListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.ListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.categories.remove":{"description":"Delete an insurer category and detach all its HCAs (staff only).","post":{"operationId":"offer-rules.categories.remove","tags":["offer-rules"],"description":"Delete an insurer category and detach all its HCAs (staff only).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.RemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.RemoveResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.RemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.categories.update":{"description":"Update an insurer category (staff only). Accepts the full HCA list; HCAs removed from the list are detached and HCAs added are upserted.","post":{"operationId":"offer-rules.categories.update","tags":["offer-rules"],"description":"Update an insurer category (staff only). Accepts the full HCA list; HCAs removed from the list are detached and HCAs added are upserted.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.UpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.UpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.categories.UpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.configs.get":{"description":"Full version history for a single business rule, newest first. The head is the live body.","post":{"operationId":"offer-rules.configs.get","tags":["offer-rules"],"description":"Full version history for a single business rule, newest first. The head is the live body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.GetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.GetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.configs.insert":{"description":"Create a new work_provider_offer_rule configured by form-data; emits the first version of the config and the underlying business rule.","post":{"operationId":"offer-rules.configs.insert","tags":["offer-rules"],"description":"Create a new work_provider_offer_rule configured by form-data; emits the first version of the config and the underlying business rule.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.InsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.InsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.InsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.configs.list":{"description":"Merged view: configs authored by the caller plus configs authored by other orgs whose targets apply to the caller, paired by name where both exist.","post":{"operationId":"offer-rules.configs.list","tags":["offer-rules"],"description":"Merged view: configs authored by the caller plus configs authored by other orgs whose targets apply to the caller, paired by name where both exist.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.ListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.ListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.ListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.configs.remove":{"description":"Delete the underlying business rule (cascades to config versions).","post":{"operationId":"offer-rules.configs.remove","tags":["offer-rules"],"description":"Delete the underlying business rule (cascades to config versions).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.RemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.RemoveResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.RemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.configs.update":{"description":"Save a new version of a config's form-data; regenerates and updates the linked business_rules.body.","post":{"operationId":"offer-rules.configs.update","tags":["offer-rules"],"description":"Save a new version of a config's form-data; regenerates and updates the linked business_rules.body.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.UpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.UpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.configs.UpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.evaluate":{"description":"Bulk-evaluate offer rules for the caller's organization: site rule, insurer-authored work-provider rule, and repairer-authored override (highest priority wins). Enriches each item's hca_category server-side. Decisions are returned index-aligned with the request items.","post":{"operationId":"offer-rules.evaluate","tags":["offer-rules"],"description":"Bulk-evaluate offer rules for the caller's organization: site rule, insurer-authored work-provider rule, and repairer-authored override (highest priority wins). Enriches each item's hca_category server-side. Decisions are returned index-aligned with the request items.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.evaluate.EvaluateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.evaluate.EvaluateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.evaluate.EvaluateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.job-views.get":{"description":"Beta. The work-provider offer rule as it applies to one job: for each estimated part, its insurer category and the supply types the rule allows for the job's vehicle. Materialised from the rule's stored config; supplier enforcement is not represented. Callable by the job's repairer or its work provider.","post":{"operationId":"offer-rules.job-views.get","tags":["offer-rules"],"description":"Beta. The work-provider offer rule as it applies to one job: for each estimated part, its insurer category and the supply types the rule allows for the job's vehicle. Materialised from the rule's stored config; supplier enforcement is not represented. Callable by the job's repairer or its work provider.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.job_views.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.job_views.GetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.job_views.GetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-rules.job-views.summaries.get-many":{"description":"Beta. The work-provider offer rule folded to one line per job: whether a rule resolved, how many estimated parts map to an insurer category, and per supply type whether any mapped part allows it and whether every one disallows it. For list views; use job-views.get for the per-part breakdown.","post":{"operationId":"offer-rules.job-views.summaries.get-many","tags":["offer-rules"],"description":"Beta. The work-provider offer rule folded to one line per job: whether a rule resolved, how many estimated parts map to an insurer category, and per supply type whether any mapped part allows it and whether every one disallows it. For list views; use job-views.get for the per-part breakdown.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.job_views.GetManyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_rules.job_views.JobRuleSummary"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_rules.job_views.GetManyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offer-snapshot.get":{"description":"Get an offer snapshot by identifier","post":{"operationId":"offer-snapshot.get","tags":["Offer Snapshot"],"description":"Get an offer snapshot by identifier","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_snapshot.GetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_snapshot.SnapshotData"}]}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_snapshot.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-snapshot.metadata.get-many":{"description":"Get offer snapshot metadata for multiple jobs. Will only return metadata for jobs the caller has access to.","post":{"operationId":"offer-snapshot.metadata.get-many","tags":["Offer Snapshot"],"description":"Get offer snapshot metadata for multiple jobs. Will only return metadata for jobs the caller has access to.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_snapshot.MetadataGetManyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_snapshot.Metadata"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_snapshot.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offer-snapshot.recommendations.search":{"description":"Stream recommendation runs from the log: each job's latest run, or runs by id, by legacy snapshot hash, or by a stored reference whose `value` is either: a lowercase hyphenated UUID is a run id, and any other `value` is a legacy snapshot hash, with the requested sections. Sends one frame per run, then `done`, or `failed` if reading stops part way. Only returns runs for jobs the caller has access to.","post":{"operationId":"offer-snapshot.recommendations.search","tags":["Offer Snapshot"],"description":"Stream recommendation runs from the log: each job's latest run, or runs by id, by legacy snapshot hash, or by a stored reference whose `value` is either: a lowercase hyphenated UUID is a run id, and any other `value` is a legacy snapshot hash, with the requested sections. Sends one frame per run, then `done`, or `failed` if reading stops part way. Only returns runs for jobs the caller has access to.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_snapshot.SearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/offer_snapshot.SearchFrame"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_snapshot.SearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offers.recommendations.repairer.v1.search":{"description":"Search for a job by ID. Baskets are produced using the business rules basket builder config defined for the caller's organization","post":{"operationId":"offers.recommendations.repairer.v1.search","tags":["Offer Recommendations"],"description":"Search for a job by ID. Baskets are produced using the business rules basket builder config defined for the caller's organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.RepairerSearchRequestV1"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.RepairerRecommendations"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offers.recommendations.supplier.v1.search":{"description":"Search for a job by ID. Baskets are produced using the provided business rules basket builder config","post":{"operationId":"offers.recommendations.supplier.v1.search","tags":["Offer Recommendations"],"description":"Search for a job by ID. Baskets are produced using the provided business rules basket builder config","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.SupplierSearchRequestV1"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.SupplierRecommendations"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/offers.repairer.evaluate":{"description":"Run a job's offer stages up to the plan's chosen one and return the entity-keyed tables they produced. A plan through rank can be recorded, returning the run's id","post":{"operationId":"offers.repairer.evaluate","tags":["Offer Recommendations"],"description":"Run a job's offer stages up to the plan's chosen one and return the entity-keyed tables they produced. A plan through rank can be recorded, returning the run's id","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offers.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"offers.Response<offers.Clearance>","required":["offers","products","run","stages","suppliers"],"properties":{"offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.offer.Offer"}},"products":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.product.Product"}},"run":{"$ref":"#/components/schemas/offers.Run"},"stages":{"description":"The stages that ran, in order, each with how it went and what it decided. The suppliers, products and offers above are shared by every stage.","type":"array","items":{"oneOf":[{"type":"object","title":"search<offers.Clearance>","required":["outcome","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<std.tuple.Tuple0>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"partial<std.tuple.Tuple0>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"failed<std.tuple.Tuple0>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"search"}}},{"type":"object","title":"price<offers.Clearance>","required":["outcome","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<std.tuple.Tuple0>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"partial<std.tuple.Tuple0>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"failed<std.tuple.Tuple0>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"price"}}},{"type":"object","title":"assess<offers.Clearance>","required":["outcome","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<std.tuple.Tuple0>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"partial<std.tuple.Tuple0>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"failed<std.tuple.Tuple0>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"assess"}}},{"type":"object","title":"basket<offers.Clearance>","required":["clearance","outcome","stage"],"properties":{"clearance":{"description":"Whether the work provider's hold on the job has cleared. Temporary: the job eligibility rule replaces it.","$ref":"#/components/schemas/offers.Clearance"},"outcome":{"oneOf":[{"type":"object","title":"complete<std.vec.Vec<offers.basket.Entry>>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.basket.Entry"}}}},{"type":"object","title":"partial<std.vec.Vec<offers.basket.Entry>>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.basket.Entry"}}}},{"type":"object","title":"failed<std.vec.Vec<offers.basket.Entry>>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"basket"}}},{"type":"object","title":"rank<offers.Clearance>","required":["outcome","outreach","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<offers.stage.Ranking>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/offers.stage.Ranking"}}},{"type":"object","title":"partial<offers.stage.Ranking>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/offers.stage.Ranking"}}},{"type":"object","title":"failed<offers.stage.Ranking>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"outreach":{"description":"Offer request recommendations. Temporary: ranking supersedes them.","type":"array","items":{"$ref":"#/components/schemas/offers.Outreach"}},"stage":{"const":"rank"}}}]}},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.supplier.Supplier"}}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.OffersEvaluateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/offers.supplier.evaluate":{"description":"Run a job's offer stages for the calling supplier, over the parts it gives, up to baskets with inline pipelines. Nothing is recorded","post":{"operationId":"offers.supplier.evaluate","tags":["Offer Recommendations"],"description":"Run a job's offer stages for the calling supplier, over the parts it gives, up to baskets with inline pipelines. Nothing is recorded","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/offers.SupplierRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"offers.Response<offers.Withheld>","required":["offers","products","run","stages","suppliers"],"properties":{"offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.offer.Offer"}},"products":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.product.Product"}},"run":{"$ref":"#/components/schemas/offers.Run"},"stages":{"description":"The stages that ran, in order, each with how it went and what it decided. The suppliers, products and offers above are shared by every stage.","type":"array","items":{"oneOf":[{"type":"object","title":"search<offers.Withheld>","required":["outcome","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<std.tuple.Tuple0>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"partial<std.tuple.Tuple0>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"failed<std.tuple.Tuple0>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"search"}}},{"type":"object","title":"price<offers.Withheld>","required":["outcome","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<std.tuple.Tuple0>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"partial<std.tuple.Tuple0>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"failed<std.tuple.Tuple0>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"price"}}},{"type":"object","title":"assess<offers.Withheld>","required":["outcome","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<std.tuple.Tuple0>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"partial<std.tuple.Tuple0>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},{"type":"object","title":"failed<std.tuple.Tuple0>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"assess"}}},{"type":"object","title":"basket<offers.Withheld>","required":["clearance","outcome","stage"],"properties":{"clearance":{"description":"Whether the work provider's hold on the job has cleared. Temporary: the job eligibility rule replaces it.","$ref":"#/components/schemas/offers.Withheld"},"outcome":{"oneOf":[{"type":"object","title":"complete<std.vec.Vec<offers.basket.Entry>>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.basket.Entry"}}}},{"type":"object","title":"partial<std.vec.Vec<offers.basket.Entry>>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.basket.Entry"}}}},{"type":"object","title":"failed<std.vec.Vec<offers.basket.Entry>>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"stage":{"const":"basket"}}},{"type":"object","title":"rank<offers.Withheld>","required":["outcome","outreach","stage"],"properties":{"outcome":{"oneOf":[{"type":"object","title":"complete<offers.stage.Ranking>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"$ref":"#/components/schemas/offers.stage.Ranking"}}},{"type":"object","title":"partial<offers.stage.Ranking>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"$ref":"#/components/schemas/offers.stage.Ranking"}}},{"type":"object","title":"failed<offers.stage.Ranking>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]},"outreach":{"description":"Offer request recommendations. Temporary: ranking supersedes them.","type":"array","items":{"$ref":"#/components/schemas/offers.Outreach"}},"stage":{"const":"rank"}}}]}},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.supplier.Supplier"}}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/offer_recommendation.OffersEvaluateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/onboarding.repairer.submissions.insert":{"description":"Public endpoint for repairers (or CS on their behalf) to submit an onboarding intake form.","post":{"operationId":"onboarding.repairer.submissions.insert","tags":["Repairer Onboarding"],"description":"Public endpoint for repairers (or CS on their behalf) to submit an onboarding intake form.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.repairer.SubmitRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.SubmitResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.SubmitError"}}}}}}},"/api/v1/onboarding.repairer.work-providers.list":{"description":"Public catalogue of insurer (work provider) businesses — drives the form's desired-work-providers multi-select.","post":{"operationId":"onboarding.repairer.work-providers.list","tags":["Repairer Onboarding"],"description":"Public catalogue of insurer (work provider) businesses — drives the form's desired-work-providers multi-select.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.repairer.WorkProvidersListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.repairer.WorkProvidersListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.WorkProvidersListError"}}}}}}},"/api/v1/onboarding.supplier.makes.list":{"description":"Public catalogue of vehicle makes — drives the form's make picker. Backed by the canonical UVDB makes table.","post":{"operationId":"onboarding.supplier.makes.list","tags":["Supplier Onboarding"],"description":"Public catalogue of vehicle makes — drives the form's make picker. Backed by the canonical UVDB makes table.","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.supplier.MakesListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.MakesListError"}}}}}}},"/api/v1/onboarding.supplier.submissions.insert":{"description":"Public endpoint for suppliers (or CS on their behalf) to submit an onboarding intake form.","post":{"operationId":"onboarding.supplier.submissions.insert","tags":["Supplier Onboarding"],"description":"Public endpoint for suppliers (or CS on their behalf) to submit an onboarding intake form.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.supplier.SubmitRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.SubmitResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/onboarding.SubmitError"}}}}}}},"/api/v1/orders.cancel":{"description":"Endpoint for cancelling the draft order","post":{"operationId":"orders.cancel","tags":["Orders"],"description":"Endpoint for cancelling the draft order","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/order.OrderCancelData"},{"type":"object","title":"IdentityData<uuid.Uuid, order.OrderCancelData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},{"type":"object","title":"UpdateOrElse<IdentityData<uuid.Uuid, order.OrderCancelData>, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersMutationResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersCancelError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.confirm":{"description":"Endpoint for confirming an order","post":{"operationId":"orders.confirm","tags":["Orders"],"description":"Endpoint for confirming an order","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/order.OrderConfirmData"},{"type":"object","title":"IdentityData<uuid.Uuid, order.OrderConfirmData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},{"type":"object","title":"UpdateOrElse<IdentityData<uuid.Uuid, order.OrderConfirmData>, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersMutationResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersConfirmError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.get":{"description":"Endpoint for fetching an order by id","post":{"operationId":"orders.get","tags":["Orders"],"description":"Endpoint for fetching an order by id","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.insert":{"description":"Endpoint for creating a new order","post":{"operationId":"orders.insert","tags":["Orders"],"description":"Endpoint for creating a new order","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/order.OrderInsertData"},{"type":"object","title":"IdentityData<std.string.String, order.OrderInsertData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/std.string.String"}}}]},{"type":"object","title":"InsertOrElse<IdentityData<std.string.String, order.OrderInsertData>, IfExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnInsert<IfExistsAbortOrIgnore>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsAbortOrIgnore"},"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/MatchCondition"}]}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersMutationResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.inventory.verify":{"description":"Endpoint for verifying there is sufficient inventory to fulfil order","post":{"operationId":"orders.inventory.verify","tags":["Orders"],"description":"Endpoint for verifying there is sufficient inventory to fulfil order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersInventoryVerifyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersInventoryVerifyResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersInventoryVerifyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.items.process":{"description":"Endpoint for processing item states of a received order","post":{"operationId":"orders.items.process","tags":["Orders"],"description":"Endpoint for processing item states of a received order","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/order.OrderItemsProcessData"},{"type":"object","title":"IdentityData<uuid.Uuid, order.OrderItemsProcessData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},{"type":"object","title":"UpdateOrElse<IdentityData<uuid.Uuid, order.OrderItemsProcessData>, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersMutationResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersItemsProcessError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.jobs.list":{"description":"Endpoint for fetching all orders for a job","post":{"operationId":"orders.jobs.list","tags":["Orders"],"description":"Endpoint for fetching all orders for a job","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.SupplierOrder"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.list":{"description":"Endpoint for fetching all orders","post":{"operationId":"orders.list","tags":["Orders"],"description":"Endpoint for fetching all orders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<order.SupplierOrder>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.SupplierOrder"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.ordered.count":{"description":"Endpoint for fetching the count of ordered items in an order","post":{"operationId":"orders.ordered.count","tags":["Orders"],"description":"Endpoint for fetching the count of ordered items in an order","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/i64"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersOrderedCountError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.repairer.insert":{"description":"Endpoint for creating a new order by a repairer","post":{"operationId":"orders.repairer.insert","tags":["Orders"],"description":"Endpoint for creating a new order by a repairer","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/order.OrdersRepairerInsertRequestData"},{"type":"object","title":"IdentityData<std.string.String, order.OrdersRepairerInsertRequestData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/std.string.String"}}}]},{"type":"object","title":"InsertOrElse<IdentityData<std.string.String, order.OrdersRepairerInsertRequestData>, IfExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnInsert<IfExistsAbortOrIgnore>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsAbortOrIgnore"},"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/MatchCondition"}]}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersMutationResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.search":{"description":"Endpoint for searching all orders","post":{"operationId":"orders.search","tags":["Orders"],"description":"Endpoint for searching all orders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.shipments.feedback.get":{"description":"Endpoint for retrieving all feedback for a specific shipment","post":{"operationId":"orders.shipments.feedback.get","tags":["Orders"],"description":"Endpoint for retrieving all feedback for a specific shipment","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentFeedbackGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.shipments.feedback.insert":{"description":"Endpoint for submitting feedback for an entire shipment","post":{"operationId":"orders.shipments.feedback.insert","tags":["Orders"],"description":"Endpoint for submitting feedback for an entire shipment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentFeedbackInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.SupplierOrder"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersItemsProcessError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.shipments.get":{"description":"Endpoint for retrieving a shipment with its order and item details","post":{"operationId":"orders.shipments.get","tags":["Orders"],"description":"Endpoint for retrieving a shipment with its order and item details","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Identity<uuid.Uuid>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.shipments.insert":{"description":"Endpoint for creating a shipment for an order with selected items","post":{"operationId":"orders.shipments.insert","tags":["Orders"],"description":"Endpoint for creating a shipment for an order with selected items","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersItemsProcessError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.shipments.list":{"description":"Endpoint for listing shipments with pagination and filtering","post":{"operationId":"orders.shipments.list","tags":["Orders"],"description":"Endpoint for listing shipments with pagination and filtering","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersShipmentListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/orders.update":{"description":"Endpoint for updating an existing order","post":{"operationId":"orders.update","tags":["Orders"],"description":"Endpoint for updating an existing order","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"allOf":[{"$ref":"#/components/schemas/order.OrderUpdateData"},{"type":"object","title":"IdentityData<uuid.Uuid, order.OrderUpdateData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},{"type":"object","title":"UpdateOrElse<IdentityData<uuid.Uuid, order.OrderUpdateData>, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersMutationResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/order.OrdersUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.customization.get":{"description":"Beta — unstable. Returns the UX/branding customization for an organization. Fields are subject to change; external integrations must not depend on them. Requires authentication as an org member.","post":{"operationId":"organizations.customization.get","tags":["Authentication"],"description":"Beta — unstable. Returns the UX/branding customization for an organization. Fields are subject to change; external integrations must not depend on them. Requires authentication as an org member.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/auth.organizations_customization_get.OrganizationCustomizationModel"}]}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.customization.update":{"description":"Beta — unstable. Updates the UX/branding customization for an organization. Fields are subject to change. Requires org admin.","post":{"operationId":"organizations.customization.update","tags":["Authentication"],"description":"Beta — unstable. Updates the UX/branding customization for an organization. Fields are subject to change. Requires org admin.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_customization_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_customization_get.OrganizationCustomizationModel"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_customization_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.get":{"description":"Returns all of the details of an organization, including its admin user group and other user groups.\nThe current user should be an admin for the organization","post":{"operationId":"organizations.get","tags":["Authentication"],"description":"Returns all of the details of an organization, including its admin user group and other user groups.\nThe current user should be an admin for the organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.get-v2":{"description":"Returns one organization: its public profile, and for members and Partly staff the private half too.\nEvery caller gets the public profile; the private profile — contact, status, the profile settings and the per-org UX flags, all flat — is returned only to members of the organization and to Partly staff.\nGroups are not included; use groups.list.","post":{"operationId":"organizations.get-v2","tags":["Authentication"],"description":"Returns one organization: its public profile, and for members and Partly staff the private half too.\nEvery caller gets the public profile; the private profile — contact, status, the profile settings and the per-org UX flags, all flat — is returned only to members of the organization and to Partly staff.\nGroups are not included; use groups.list.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get_v2.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.insert":{"description":"Creates a new organization. The organization starts with no members;\nadd them with `users.invite`. Restricted to users with the `partly_staff` permission.","post":{"operationId":"organizations.insert","tags":["Authentication"],"description":"Creates a new organization. The organization starts with no members;\nadd them with `users.invite`. Restricted to users with the `partly_staff` permission.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_insert.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_insert.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_insert.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.keys.insert":{"description":"Inserts a long term lived API key","post":{"operationId":"organizations.keys.insert","tags":["Authentication"],"description":"Inserts a long term lived API key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.keys.list":{"description":"Lists a set of long-lived API keys issued for an organization","post":{"operationId":"organizations.keys.list","tags":["Authentication"],"description":"Lists a set of long-lived API keys issued for an organization","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.keys.remove":{"description":"Removes a long-lived API key previously issued for an organization","post":{"operationId":"organizations.keys.remove","tags":["Authentication"],"description":"Removes a long-lived API key previously issued for an organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.list":{"description":"Lists organizations where the current user is a member.","post":{"operationId":"organizations.list","tags":["Authentication"],"description":"Lists organizations where the current user is a member.","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"NonPaginatedList<auth.organizations_list.OrganizationModel>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.organizations_list.OrganizationModel"}}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_list.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.profile.get":{"description":"Returns the profile of an organization, including the timezone and currency settings if present.","post":{"operationId":"organizations.profile.get","tags":["Authentication"],"description":"Returns the profile of an organization, including the timezone and currency settings if present.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OrganizationProfile"}]}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.search":{"description":"Searches available organizations.\nAllowed for any authorized user.\nA filter, at least 3 characters, should be specified to search an organization by name or part of a name","post":{"operationId":"organizations.search","tags":["Authentication"],"description":"Searches available organizations.\nAllowed for any authorized user.\nA filter, at least 3 characters, should be specified to search an organization by name or part of a name","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_search.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"NonPaginatedList<auth.organizations_search.OrganizationModel>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.organizations_search.OrganizationModel"}}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_search.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.search-v2":{"description":"Searches organizations, with forward pagination.\nDefaults to the caller's own organizations; pass membership: any to search the whole directory. Results carry public fields only — use organizations.get-v2 for the private half of an organization you belong to.","post":{"operationId":"organizations.search-v2","tags":["Authentication"],"description":"Searches organizations, with forward pagination.\nDefaults to the caller's own organizations; pass membership: any to search the whole directory. Results carry public fields only — use organizations.get-v2 for the private half of an organization you belong to.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_search_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<business_network.PublicOrganizationProfile>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.PublicOrganizationProfile"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_search_v2.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.update":{"description":"Updates organization's details.\nThe current user should be an admin for the organization","post":{"operationId":"organizations.update","tags":["Authentication"],"description":"Updates organization's details.\nThe current user should be an admin for the organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_update.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/organizations.update-v2":{"description":"Updates one organization, including the per-org UX flags.\nEvery field distinguishes leave-unchanged from clear. Requires org admin or Partly staff; sso_required and is_test_organization are Partly staff only.\nResponds with the same payload as organizations.get-v2.","post":{"operationId":"organizations.update-v2","tags":["Authentication"],"description":"Updates one organization, including the per-org UX flags.\nEvery field distinguishes leave-unchanged from clear. Requires org admin or Partly staff; sso_required and is_test_organization are Partly staff only.\nResponds with the same payload as organizations.get-v2.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_update_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_get_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_update_v2.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.users.list":{"description":"Lists all users for a specific organization, with pagination support.","post":{"operationId":"organizations.users.list","tags":["Authentication"],"description":"Lists all users for a specific organization, with pagination support.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_users_list.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<auth.organizations_users_list.OrganizationsUsersListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.organizations_users_list.OrganizationsUsersListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_users_list.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.users.search":{"description":"Searches users in an organization by partial name or email. Empty query returns a paginated list of all users in the organization.","post":{"operationId":"organizations.users.search","tags":["Authentication"],"description":"Searches users in an organization by partial name or email. Empty query returns a paginated list of all users in the organization.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_users_search.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<auth.organizations_users_search.OrganizationsUsersSearchItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.organizations_users_search.OrganizationsUsersSearchItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.organizations_users_search.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/organizations.verify":{"description":"Validates authorization header and its relation to an organization","post":{"operationId":"organizations.verify","tags":["Authentication"],"description":"Validates authorization header and its relation to an organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsVerifyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationAuthorizationDetails"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.OrganizationsVerifyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/presence.get":{"description":"Get current presence for one or more resources","post":{"operationId":"presence.get","tags":["Realtime"],"description":"Get current presence for one or more resources","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/presence.sessions.insert":{"description":"Enter presence for a resource","post":{"operationId":"presence.sessions.insert","tags":["Realtime"],"description":"Enter presence for a resource","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceEnterRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceEnterResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceEnterError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/presence.sessions.refresh":{"description":"Refresh a presence lease","post":{"operationId":"presence.sessions.refresh","tags":["Realtime"],"description":"Refresh a presence lease","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceHeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceHeartbeatResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceHeartbeatError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/presence.sessions.remove":{"description":"Leave presence for a resource","post":{"operationId":"presence.sessions.remove","tags":["Realtime"],"description":"Leave presence for a resource","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceLeaveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceLeaveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/presence.stream":{"description":"Subscribe to per-resource presence updates over SSE","post":{"operationId":"presence.stream","tags":["Realtime"],"description":"Subscribe to per-resource presence updates over SSE","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceStreamRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/realtime.PresenceStreamFrame"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/realtime.PresenceStreamError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/proxy.diagram-categories.get":{"description":"Endpoint for predicting diagram categories.","post":{"operationId":"proxy.diagram-categories.get","tags":["ML"],"description":"Endpoint for predicting diagram categories.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramCategoryPredictionRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.DiagramCategoryPredictionResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.DiagramCategoryPredictionResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/proxy.embedding-search.get":{"description":"Endpoint for performing an embedding search.","post":{"operationId":"proxy.embedding-search.get","tags":["ML"],"description":"Endpoint for performing an embedding search.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.SearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.SearchResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.SearchResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/proxy.part-list-extraction.get":{"description":"Endpoint for extracting a part list from media.","post":{"operationId":"proxy.part-list-extraction.get","tags":["ML"],"description":"Endpoint for extracting a part list from media.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.PartListExtractionRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.PartListExtractionResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.PartListExtractionResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/proxy.predict-raw-to-hca.get":{"description":"Endpoint for predicting raw description to HCA.","post":{"operationId":"proxy.predict-raw-to-hca.get","tags":["ML"],"description":"Endpoint for predicting raw description to HCA.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.R2hRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.R2hResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.R2hResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/proxy.recommend-parts.get":{"description":"Endpoint for recommending parts.","post":{"operationId":"proxy.recommend-parts.get","tags":["ML"],"description":"Endpoint for recommending parts.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.RecommendationRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ml.UpstreamResponse<tier1.RecommendationResponse>","required":["data","headers","status"],"properties":{"data":{"$ref":"#/components/schemas/tier1.RecommendationResponse"},"headers":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"status":{"$ref":"#/components/schemas/u16"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ml.ProxyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/ratings.list":{"description":"List metrics","post":{"operationId":"ratings.list","tags":["Ratings"],"description":"List metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ratings.ListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ratings.MetricKind"}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ratings.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.jobs.parts.verify":{"description":"Verify the parts on a job for the repairer that owns it","post":{"operationId":"repairer.jobs.parts.verify","tags":["Parts Verification"],"description":"Verify the parts on a job for the repairer that owns it","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/repairer_jobs_parts_verify.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/repairer_jobs_parts_verify.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/parts_verification.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.close":{"description":"Close a procurement (repairer)","post":{"operationId":"repairer.procurements.close","tags":["Procurement"],"description":"Close a procurement (repairer)","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/procurement.repairer.ProcurementCloseData"},{"type":"object","title":"UpdateOrElse<procurement.repairer.ProcurementCloseData, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementCloseResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementCloseError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.events.list":{"description":"List events for a procurement (buyer view).","post":{"operationId":"repairer.procurements.events.list","tags":["Procurement"],"description":"List events for a procurement (buyer view).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.EventListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.EventListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.EventListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.get":{"description":"Get procurement details (repairer)","post":{"operationId":"repairer.procurements.get","tags":["Procurement"],"description":"Get procurement details (repairer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.insert":{"description":"Create a new procurement (repairer)","post":{"operationId":"repairer.procurements.insert","tags":["Procurement"],"description":"Create a new procurement (repairer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.notes.insert":{"description":"Create a note on a procurement (buyer).","post":{"operationId":"repairer.procurements.notes.insert","tags":["Procurement"],"description":"Create a note on a procurement (buyer).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.notes.list":{"description":"List notes for a procurement (buyer view).","post":{"operationId":"repairer.procurements.notes.list","tags":["Procurement"],"description":"List notes for a procurement (buyer view).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.notes.remove":{"description":"Remove a note from a procurement (buyer).","post":{"operationId":"repairer.procurements.notes.remove","tags":["Procurement"],"description":"Remove a note from a procurement (buyer).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteRemoveResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.notes.update":{"description":"Update a note on a procurement (buyer).","post":{"operationId":"repairer.procurements.notes.update","tags":["Procurement"],"description":"Update a note on a procurement (buyer).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.order":{"description":"Transition a procurement from offers_sent to order_requested (repairer)","post":{"operationId":"repairer.procurements.order","tags":["Procurement"],"description":"Transition a procurement from offers_sent to order_requested (repairer)","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/procurement.repairer.ProcurementOrderData"},{"type":"object","title":"UpdateOrElse<procurement.repairer.ProcurementOrderData, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementOrderResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementOrderError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.request":{"description":"Revise an existing offer-request procurement (repairer)","post":{"operationId":"repairer.procurements.request","tags":["Procurement"],"description":"Revise an existing offer-request procurement (repairer)","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/procurement.repairer.ProcurementRequestData"},{"type":"object","title":"UpdateOrElse<procurement.repairer.ProcurementRequestData, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementRequestResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementRequestError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.procurements.search":{"description":"Search procurements (repairer)","post":{"operationId":"repairer.procurements.search","tags":["Procurement"],"description":"Search procurements (repairer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.shipments.get":{"description":"Get a shipment with its items (repairer)","post":{"operationId":"repairer.shipments.get","tags":["Procurement"],"description":"Get a shipment with its items (repairer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ShipmentGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ShipmentGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ShipmentGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairer.shipments.search":{"description":"Search shipments (repairer)","post":{"operationId":"repairer.shipments.search","tags":["Procurement"],"description":"Search shipments (repairer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ShipmentSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ShipmentSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ShipmentSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/repairers.verify":{"description":"Validates authorization header and its relation to a repairer account","post":{"operationId":"repairers.verify","tags":["Authentication"],"description":"Validates authorization header and its relation to a repairer account","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.RepairersVerifyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_repairer.RepairerAuthorizationDetails"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.RepairersVerifyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/sellables.ingest":{"description":"Data Ingest API for Sellables","post":{"operationId":"sellables.ingest","tags":["Ingest"],"description":"Data Ingest API for Sellables","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.IngestRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.IngestResult"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.IngestErrorResponse"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/sellables.ingest-async":{"description":"Asynchronous Data Ingest API for ingesting sellables. You must call `async-imports.prepare` before invoking this endpoint.","post":{"operationId":"sellables.ingest-async","tags":["Ingest"],"description":"Asynchronous Data Ingest API for ingesting sellables. You must call `async-imports.prepare` before invoking this endpoint.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.SellablesIngestAsyncRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingest.SellablesIngestAsyncError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/sellables.list":{"description":"Return paginated list of ids for sellables","post":{"operationId":"sellables.list","tags":["Lookup"],"description":"Return paginated list of ids for sellables","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<lookup.SellableListItem>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableListItem"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.LookupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/sellables.lookup":{"description":"Data Lookup API for Sellables, Parts and Vehicles","post":{"operationId":"sellables.lookup","tags":["Lookup"],"description":"Data Lookup API for Sellables, Parts and Vehicles","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.SellablesLookupRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.SellablesLookupResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.LookupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/sellables.publish":{"description":"Publishes products to the list of integrations provided","post":{"operationId":"sellables.publish","tags":["Integrations"],"description":"Publishes products to the list of integrations provided","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.PublishRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/integration.IntegrationError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/sellables.search":{"description":"Searches for sellable products by brand and MPN in a given store\nand returns them in a format suitable for the supply search workflow.","post":{"operationId":"sellables.search","tags":["Lookup"],"description":"Searches for sellable products by brand and MPN in a given store\nand returns them in a format suitable for the supply search workflow.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.SellablesSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.SellablesSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.LookupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/sellables.search-v2":{"description":"Search `sellables.sellables` by SKU, name, part (brand_id, mpn), assembly, inventory, and time filters, scoped to the authenticated organization. Requires an Authorization header carrying organization authorization details.","post":{"operationId":"sellables.search-v2","tags":["Lookup"],"description":"Search `sellables.sellables` by SKU, name, part (brand_id, mpn), assembly, inventory, and time filters, scoped to the authenticated organization. Requires an Authorization header carrying organization authorization details.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.SellablesSearchV2Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.SellablesSearchV2Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.SellablesSearchV2Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/service-accounts.get":{"description":"","post":{"operationId":"service-accounts.get","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.AccountId"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.AccountRow"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/service-accounts.insert":{"description":"","post":{"operationId":"service-accounts.insert","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.CreateAccount"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.AccountCreated"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/service-accounts.keys.insert":{"description":"","post":{"operationId":"service-accounts.keys.insert","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.CreateKey"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.KeyCreated"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/service-accounts.keys.list":{"description":"","post":{"operationId":"service-accounts.keys.list","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.AccountId"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.ServiceAccountKeySummary"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/service-accounts.keys.remove":{"description":"","post":{"operationId":"service-accounts.keys.remove","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.KeyId"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/service-accounts.list":{"description":"","post":{"operationId":"service-accounts.list","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ListAccounts"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/service_accounts.AccountRow"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/service-accounts.remove":{"description":"","post":{"operationId":"service-accounts.remove","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.AccountId"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/service-accounts.update":{"description":"","post":{"operationId":"service-accounts.update","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.UpdateAccount"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.AccountCreated"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/service_accounts.ManagementError"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/supplier-metrics.observations.list":{"description":"List the observations recorded for a procurement.","post":{"operationId":"supplier-metrics.observations.list","tags":["SupplierMetrics"],"description":"List the observations recorded for a procurement.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supplier_metrics.ListObservationsRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supplier_metrics.ListObservationsResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supplier_metrics.ListObservationsError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier-metrics.windowed.search":{"description":"Query windowed supplier metric cells by dimensions and scope kinds.","post":{"operationId":"supplier-metrics.windowed.search","tags":["SupplierMetrics"],"description":"Query windowed supplier metric cells by dimensions and scope kinds.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supplier_metrics.QueryWindowedRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supplier_metrics.QueryWindowedResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supplier_metrics.QueryWindowedError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.assignees.insert":{"description":"Add assigned users to a procurement (supplier)","post":{"operationId":"supplier.procurements.assignees.insert","tags":["Procurement"],"description":"Add assigned users to a procurement (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.assignees.list":{"description":"List assigned users on a procurement (supplier)","post":{"operationId":"supplier.procurements.assignees.list","tags":["Procurement"],"description":"List assigned users on a procurement (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.assignees.remove":{"description":"Remove assigned users from a procurement (supplier)","post":{"operationId":"supplier.procurements.assignees.remove","tags":["Procurement"],"description":"Remove assigned users from a procurement (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementAssignmentError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.businesses.search":{"description":"List buyer businesses that have procured from this supplier","post":{"operationId":"supplier.procurements.businesses.search","tags":["Procurement"],"description":"List buyer businesses that have procured from this supplier","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.SupplierBusinessSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.SupplierBusinessSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.SupplierBusinessSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.claims.attachments.prepare":{"description":"Prepare private upload URLs for files attached to a supplier return claim.","post":{"operationId":"supplier.procurements.claims.attachments.prepare","tags":["Procurement"],"description":"Prepare private upload URLs for files attached to a supplier return claim.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimAttachmentsPrepareRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimAttachmentsPrepareResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimAttachmentsPrepareError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.claims.insert":{"description":"Record returned offered items on a confirmed procurement (supplier).","post":{"operationId":"supplier.procurements.claims.insert","tags":["Procurement"],"description":"Record returned offered items on a confirmed procurement (supplier).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.claims.list":{"description":"List return claims recorded on a procurement (supplier).","post":{"operationId":"supplier.procurements.claims.list","tags":["Procurement"],"description":"List return claims recorded on a procurement (supplier).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ClaimListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.close":{"description":"Close a procurement (supplier)","post":{"operationId":"supplier.procurements.close","tags":["Procurement"],"description":"Close a procurement (supplier)","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/procurement.supplier.ProcurementCloseData"},{"type":"object","title":"UpdateOrElse<procurement.supplier.ProcurementCloseData, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementCloseResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementCloseError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.confirm":{"description":"Confirm an order on a procurement (supplier)","post":{"operationId":"supplier.procurements.confirm","tags":["Procurement"],"description":"Confirm an order on a procurement (supplier)","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/procurement.supplier.ProcurementConfirmData"},{"type":"object","title":"UpdateOrElse<procurement.supplier.ProcurementConfirmData, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementConfirmResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementConfirmError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.count":{"description":"Count outstanding procurement work (supplier)","post":{"operationId":"supplier.procurements.count","tags":["Procurement"],"description":"Count outstanding procurement work (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementCountRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementCountResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementCountError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.events.get":{"description":"Get a single event by id (supplier view).","post":{"operationId":"supplier.procurements.events.get","tags":["Procurement"],"description":"Get a single event by id (supplier view).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.events.insert":{"description":"Insert an event on a procurement.","post":{"operationId":"supplier.procurements.events.insert","tags":["Procurement"],"description":"Insert an event on a procurement.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.events.list":{"description":"List events for a procurement (supplier view).","post":{"operationId":"supplier.procurements.events.list","tags":["Procurement"],"description":"List events for a procurement (supplier view).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.EventListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.get":{"description":"Get procurement details (supplier)","post":{"operationId":"supplier.procurements.get","tags":["Procurement"],"description":"Get procurement details (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.notes.insert":{"description":"Create a note on a procurement (supplier).","post":{"operationId":"supplier.procurements.notes.insert","tags":["Procurement"],"description":"Create a note on a procurement (supplier).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.notes.list":{"description":"List notes for a procurement (supplier view).","post":{"operationId":"supplier.procurements.notes.list","tags":["Procurement"],"description":"List notes for a procurement (supplier view).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.notes.remove":{"description":"Remove a note from a procurement (supplier).","post":{"operationId":"supplier.procurements.notes.remove","tags":["Procurement"],"description":"Remove a note from a procurement (supplier).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteRemoveRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteRemoveResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteRemoveError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.notes.update":{"description":"Update a note on a procurement (supplier).","post":{"operationId":"supplier.procurements.notes.update","tags":["Procurement"],"description":"Update a note on a procurement (supplier).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.NoteUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.offer":{"description":"Submit or update an offer on a procurement (supplier)","post":{"operationId":"supplier.procurements.offer","tags":["Procurement"],"description":"Submit or update an offer on a procurement (supplier)","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/procurement.supplier.ProcurementOfferData"},{"type":"object","title":"UpdateOrElse<procurement.supplier.ProcurementOfferData, IfNotExistsAbort>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbort>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbort"}}}}}]}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementOfferResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementOfferError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.procurements.search":{"description":"Search procurements (supplier)","post":{"operationId":"supplier.procurements.search","tags":["Procurement"],"description":"Search procurements (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ProcurementSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.shipments.dispatch":{"description":"Dispatch a shipment (supplier)","post":{"operationId":"supplier.shipments.dispatch","tags":["Procurement"],"description":"Dispatch a shipment (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ShipmentDispatchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ShipmentDispatchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ShipmentDispatchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supplier.shipments.search":{"description":"Search shipments (supplier)","post":{"operationId":"supplier.shipments.search","tags":["Procurement"],"description":"Search shipments (supplier)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ShipmentSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ShipmentSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.supplier.ShipmentSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/suppliers.jobs.parts.verify":{"description":"Verify the parts on a job for a supplier","post":{"operationId":"suppliers.jobs.parts.verify","tags":["Parts Verification"],"description":"Verify the parts on a job for a supplier","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/suppliers_jobs_parts_verify.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/suppliers_jobs_parts_verify.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/parts_verification.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/suppliers.verify":{"description":"Validates authorization header and its relation to a supplier account (PIM store)","post":{"operationId":"suppliers.verify","tags":["Authentication"],"description":"Validates authorization header and its relation to a supplier account (PIM store)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_pim.SuppliersVerifyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_pim.SupplierAuthorizationDetails"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.SuppliersVerifyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.bindings.insert":{"description":"Bind a scope to a ruleset.","post":{"operationId":"supply-ranking.bindings.insert","tags":["SupplyRanking"],"description":"Bind a scope to a ruleset.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.BindRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.BindResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.BindError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.bindings.list":{"description":"List live bindings with structured filters.","post":{"operationId":"supply-ranking.bindings.list","tags":["SupplyRanking"],"description":"List live bindings with structured filters.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListBindingsRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<supply_ranker.BindingSummary>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.BindingSummary"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListBindingsError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.bindings.remove":{"description":"Soft-delete a binding.","post":{"operationId":"supply-ranking.bindings.remove","tags":["SupplyRanking"],"description":"Soft-delete a binding.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UnbindRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UnbindError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.bindings.search":{"description":"Search live bindings by scope or ruleset name.","post":{"operationId":"supply-ranking.bindings.search","tags":["SupplyRanking"],"description":"Search live bindings by scope or ruleset name.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.SearchBindingsRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<supply_ranker.BindingSummary>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.BindingSummary"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListBindingsError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.decisions.evaluate":{"description":"Evaluate: resolves policy, fetches live metrics, ranks candidates, records decision.","post":{"operationId":"supply-ranking.decisions.evaluate","tags":["SupplyRanking"],"description":"Evaluate: resolves policy, fetches live metrics, ranks candidates, records decision.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.EvaluateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.EvaluateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.EvaluateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.policies.get":{"description":"Read a policy by id.","post":{"operationId":"supply-ranking.policies.get","tags":["SupplyRanking"],"description":"Read a policy by id.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.GetPolicyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.GetPolicyResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.GetPolicyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.policies.insert":{"description":"Create a named policy.","post":{"operationId":"supply-ranking.policies.insert","tags":["SupplyRanking"],"description":"Create a named policy.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.CreatePolicyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.CreatePolicyResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.CreatePolicyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.policies.list":{"description":"List live policies.","post":{"operationId":"supply-ranking.policies.list","tags":["SupplyRanking"],"description":"List live policies.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListPoliciesRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<supply_ranker.PolicySummary>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PolicySummary"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListPoliciesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.policies.remove":{"description":"Soft-delete a policy. Refused while live rules reference it.","post":{"operationId":"supply-ranking.policies.remove","tags":["SupplyRanking"],"description":"Soft-delete a policy. Refused while live rules reference it.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.DeletePolicyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.DeletePolicyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.policies.search":{"description":"Search live policies by name.","post":{"operationId":"supply-ranking.policies.search","tags":["SupplyRanking"],"description":"Search live policies by name.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.SearchPoliciesRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<supply_ranker.PolicySummary>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PolicySummary"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListPoliciesError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.policies.update":{"description":"Create an immutable policy revision by id and cascade live rules to it.","post":{"operationId":"supply-ranking.policies.update","tags":["SupplyRanking"],"description":"Create an immutable policy revision by id and cascade live rules to it.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UpdatePolicyRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UpdatePolicyResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UpdatePolicyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.rulesets.get":{"description":"Read a ruleset by id, with its live rules.","post":{"operationId":"supply-ranking.rulesets.get","tags":["SupplyRanking"],"description":"Read a ruleset by id, with its live rules.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.GetRulesetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.GetRulesetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.GetRulesetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.rulesets.insert":{"description":"Create a named ruleset with rules.","post":{"operationId":"supply-ranking.rulesets.insert","tags":["SupplyRanking"],"description":"Create a named ruleset with rules.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.CreateRulesetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.CreateRulesetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.CreateRulesetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.rulesets.list":{"description":"List live rulesets.","post":{"operationId":"supply-ranking.rulesets.list","tags":["SupplyRanking"],"description":"List live rulesets.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListRulesetsRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<supply_ranker.RulesetResponse>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.RulesetResponse"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListRulesetsError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.rulesets.preview":{"description":"Walk every binding and rule for a context, marking which held.","post":{"operationId":"supply-ranking.rulesets.preview","tags":["SupplyRanking"],"description":"Walk every binding and rule for a context, marking which held.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ExplainRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ExplainResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ExplainError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.rulesets.remove":{"description":"Soft-delete a ruleset. Refused while live bindings reference it.","post":{"operationId":"supply-ranking.rulesets.remove","tags":["SupplyRanking"],"description":"Soft-delete a ruleset. Refused while live bindings reference it.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.DeleteRulesetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.DeleteRulesetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.rulesets.search":{"description":"Search live rulesets by name.","post":{"operationId":"supply-ranking.rulesets.search","tags":["SupplyRanking"],"description":"Search live rulesets by name.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.SearchRulesetsRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"ForwardPaginatedList<supply_ranker.RulesetResponse>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.RulesetResponse"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.ListRulesetsError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/supply-ranking.rulesets.update":{"description":"Rename a ruleset and replace all of its rules by id.","post":{"operationId":"supply-ranking.rulesets.update","tags":["SupplyRanking"],"description":"Rename a ruleset and replace all of its rules by id.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UpdateRulesetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UpdateRulesetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/supply_ranker.UpdateRulesetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/system.version.get":{"description":"Allows to read the current deployed version as shorthash","post":{"operationId":"system.version.get","tags":["System"],"description":"Allows to read the current deployed version as shorthash","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/system.SystemVersionInfo"}}}}}}},"/api/v1/tier1.cache.e2e.remove":{"description":"Invalidate E2E cache by chassis number and provider name.","post":{"operationId":"tier1.cache.e2e.remove","tags":["tier1"],"description":"Invalidate E2E cache by chassis number and provider name.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.E2eCacheInvalidateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.CacheHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/tier1.cache.provider-status.get":{"description":"Invalidate vin_denylist_cache by chassis number, forcing a refetch from the database.","post":{"operationId":"tier1.cache.provider-status.get","tags":["tier1"],"description":"Invalidate vin_denylist_cache by chassis number, forcing a refetch from the database.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VinDenylistCacheGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.AvailableProvidersResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.EpcHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/tier1.denylist.update":{"description":"Endpoint for auto deny listing all other providers for a chassis in order to lock down a response from that provider.","post":{"operationId":"tier1.denylist.update","tags":["tier1"],"description":"Endpoint for auto deny listing all other providers for a chassis in order to lock down a response from that provider.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DenyListUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DenyListUpdateResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.EpcHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/tier1.diagrams.annotations.list":{"description":"Fetch vision annotation data for a diagram from storage","post":{"operationId":"tier1.diagrams.annotations.list","tags":["tier1"],"description":"Fetch vision annotation data for a diagram from storage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramAnnotationGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramAnnotationGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.DiagramHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/tier1.epc.providers.list":{"description":"List every known EPC catalog provider for the DataQA o2t provider dropdown, before a VIN search resolves availability.","post":{"operationId":"tier1.epc.providers.list","tags":["tier1"],"description":"List every known EPC catalog provider for the DataQA o2t provider dropdown, before a VIN search resolves availability.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.CacheHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/tier1.oem-catalog.search":{"description":"Query OEM catalog build-sheet data. Partly staff only.","post":{"operationId":"tier1.oem-catalog.search","tags":["tier1"],"description":"Query OEM catalog build-sheet data. Partly staff only.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.OemCatalogSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.OemCatalogSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.OemCatalogSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/tier1.readiness.status.get":{"description":"Checks a vin for if it is allowlisted or denylisted.","post":{"operationId":"tier1.readiness.status.get","tags":["tier1"],"description":"Checks a vin for if it is allowlisted or denylisted.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VinPermissionCacheGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VinStatusResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.EpcHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/tier1.readiness.status.v2.get":{"description":"Check readiness status (allowlist, denylist, cache state) for one or more vehicles identified by OEM vehicle ID or chassis number.","post":{"operationId":"tier1.readiness.status.v2.get","tags":["tier1"],"description":"Check readiness status (allowlist, denylist, cache state) for one or more vehicles identified by OEM vehicle ID or chassis number.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.ReadinessStatusRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.ReadinessStatusResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.EpcHandlerError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/uploads.delete":{"description":"Deletes an upload from cloud storage by given identity","post":{"operationId":"uploads.delete","tags":["Uploads"],"description":"Deletes an upload from cloud storage by given identity","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsDeleteRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/std.tuple.Tuple0"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsDeleteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/uploads.insert":{"description":"Uploads a media file into the cloud storage (GCS, S3) directly by provided external URL. If file is an image then compressed copy of this image will be created. Returns storage_file_path and public_url and thumbnail_url if applicable","post":{"operationId":"uploads.insert","tags":["Uploads"],"description":"Uploads a media file into the cloud storage (GCS, S3) directly by provided external URL. If file is an image then compressed copy of this image will be created. Returns storage_file_path and public_url and thumbnail_url if applicable","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsInsertRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsInsertResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsInsertError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/uploads.prepare":{"description":"Generate a pre-sign URL for cloud storage (GCS, S3) for uploading a file. Returns storage_file_path and public_url if applicable","post":{"operationId":"uploads.prepare","tags":["Uploads"],"description":"Generate a pre-sign URL for cloud storage (GCS, S3) for uploading a file. Returns storage_file_path and public_url if applicable","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsPrepareRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsPrepareResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/upload.UploadsPrepareError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.confirm-v2":{"description":"Consumes a verification token issued by `users.invite-v3` and completes whichever account setup it stands for:\na self-signup email confirmation, an organization invitation, or a password-setup link for a shell account.\nAccepts an optional name and password, required when the account cannot authenticate yet.","post":{"operationId":"users.confirm-v2","tags":["Authentication"],"description":"Consumes a verification token issued by `users.invite-v3` and completes whichever account setup it stands for:\na self-signup email confirmation, an organization invitation, or a password-setup link for a shell account.\nAccepts an optional name and password, required when the account cannot authenticate yet.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_confirm_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_confirm_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_confirm_v2.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.exchange-sessions.accept":{"description":"Redeems a code shown by `users.exchange-sessions.offer` and returns a new access and refresh token pair for the user who showed it, with the same scope.\nNeeds no authorization. A code works once, and redeeming it invalidates the other codes shown by the same stream.\nUnknown, expired, used and malformed codes all return `invalid_code`. Repeated attempts return 429 `too_many_attempts`.","post":{"operationId":"users.exchange-sessions.accept","tags":["Authentication"],"description":"Redeems a code shown by `users.exchange-sessions.offer` and returns a new access and refresh token pair for the user who showed it, with the same scope.\nNeeds no authorization. A code works once, and redeeming it invalidates the other codes shown by the same stream.\nUnknown, expired, used and malformed codes all return `invalid_code`. Repeated attempts return 429 `too_many_attempts`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_exchange_sessions_accept.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_signin_v2.Tokens"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_exchange_sessions_accept.Error"}}}}}}},"/api/v1/users.exchange-sessions.offer":{"description":"Opens a stream that shows a short code for signing the caller in on another device or origin.\nRequires a signed-in user session; API keys, service tokens and verification tokens are refused.\nThe first frame is `offered` with an 8-character Crockford code and a link that carries it in the URL fragment. A fresh code is offered every 60 seconds, and each code is accepted for 120 seconds, so the current and previous codes both work.\nThe stream ends with `redeemed` once one of its codes is used, or `ended` after 10 minutes. Closing the stream early does not revoke its codes; they expire on their own.","post":{"operationId":"users.exchange-sessions.offer","tags":["Authentication"],"description":"Opens a stream that shows a short code for signing the caller in on another device or origin.\nRequires a signed-in user session; API keys, service tokens and verification tokens are refused.\nThe first frame is `offered` with an 8-character Crockford code and a link that carries it in the URL fragment. A fresh code is offered every 60 seconds, and each code is accepted for 120 seconds, so the current and previous codes both work.\nThe stream ends with `redeemed` once one of its codes is used, or `ended` after 10 minutes. Closing the stream early does not revoke its codes; they expire on their own.","responses":{"200":{"description":"200 OK","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/auth.users_exchange_sessions_offer.Frame"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_exchange_sessions_offer.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.federated-auth.request":{"description":"Generates redirect url for federated authentication.\nThis is used to authenticate users via external identity providers like Google, Microsoft, etc.\nThe user will be redirected to the identity provider's login page, and upon successful authentication,\nthe user will be redirected back to the Partly application with auth code.","post":{"operationId":"users.federated-auth.request","tags":["Authentication"],"description":"Generates redirect url for federated authentication.\nThis is used to authenticate users via external identity providers like Google, Microsoft, etc.\nThe user will be redirected to the identity provider's login page, and upon successful authentication,\nthe user will be redirected back to the Partly application with auth code.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.FederatedAuthRequestRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.FederatedAuthRequestResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.FederatedAuthRequestError"}}}}}}},"/api/v1/users.get":{"description":"Obtains user profile details","post":{"operationId":"users.get","tags":["Authentication"],"description":"Obtains user profile details","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.hubspot.get":{"description":"Generates a HubSpot visitor identification token for the authenticated user.\nThis token is used to identify users in the HubSpot live chat widget.","post":{"operationId":"users.hubspot.get","tags":["Authentication"],"description":"Generates a HubSpot visitor identification token for the authenticated user.\nThis token is used to identify users in the HubSpot live chat widget.","responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersHubspotIdentifyResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersHubspotIdentifyError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.invite-v2":{"description":"Invites a user to the organization and assigns them to the specified groups.\nThe user will receive an email invitation to confirm and complete the process.","post":{"operationId":"users.invite-v2","tags":["Authentication"],"description":"Invites a user to the organization and assigns them to the specified groups.\nThe user will receive an email invitation to confirm and complete the process.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_invite_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_invite_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_invite_v2.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}],"deprecated":true}},"/api/v1/users.invite-v3":{"description":"Creates or invites a Partly account, with the request body stating the intent. `password`: self sign-up, needs no authorization, emails an address-confirmation link. `organization_invite_email`: partly_staff, or an admin presenting a token scoped to that organization, invites someone into that organization and its groups, each group carrying an is_admin flag; the invitee sets their own credential from the email, or signs in through the IdP when the organization is SSO-required. `organization_invite_as_staff`: partly_staff attaches a member directly, optionally with a caller-supplied password and an optional email; without an email the user must already be able to sign in, so supply a password, target a user who has one, or invite into an SSO-required organization — which never accepts a password. `invite_staff`: grants Partly staff scopes and creates a platform-level account with no organization, emailing a set-password link. An address that already has an account is never given a new credential — it is attached, or granted scopes, as it is.","post":{"operationId":"users.invite-v3","tags":["Authentication"],"description":"Creates or invites a Partly account, with the request body stating the intent. `password`: self sign-up, needs no authorization, emails an address-confirmation link. `organization_invite_email`: partly_staff, or an admin presenting a token scoped to that organization, invites someone into that organization and its groups, each group carrying an is_admin flag; the invitee sets their own credential from the email, or signs in through the IdP when the organization is SSO-required. `organization_invite_as_staff`: partly_staff attaches a member directly, optionally with a caller-supplied password and an optional email; without an email the user must already be able to sign in, so supply a password, target a user who has one, or invite into an SSO-required organization — which never accepts a password. `invite_staff`: grants Partly staff scopes and creates a platform-level account with no organization, emailing a set-password link. An address that already has an account is never given a new credential — it is attached, or granted scopes, as it is.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_invite_v3.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_invite_v3.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_invite_v3.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}]}},"/api/v1/users.password.reset":{"description":"Triggers an email to reset user's password.\nThis call does not require authentication, but the email to identify a user.\nSent email is valid for 30 minutes only.\nPast emails are invalidated automatically once the new is sent.\nRepeated requests within the rate-limit window return 429 too_many_attempts.","post":{"operationId":"users.password.reset","tags":["Authentication"],"description":"Triggers an email to reset user's password.\nThis call does not require authentication, but the email to identify a user.\nSent email is valid for 30 minutes only.\nPast emails are invalidated automatically once the new is sent.\nRepeated requests within the rate-limit window return 429 too_many_attempts.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersPasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersPasswordResetError"}}}}}}},"/api/v1/users.password.update":{"description":"Changes user's password. Authorization is a code sent in an email on `users.password.reset` call","post":{"operationId":"users.password.update","tags":["Authentication"],"description":"Changes user's password. Authorization is a code sent in an email on `users.password.reset` call","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersPasswordUpdateRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersPasswordUpdateError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.remove":{"description":"Removes a user from the system, provided their departure does not leave a group or an organization without the members it needs: a group must keep at least one member and one administrator, and an organization must keep at least one confirmed member.\nThe user is removed from every group and organization, and every custom permission they hold is dropped.\nOnly the current user can delete their own profile, but a user with the `partly_staff` permission can remove others.","post":{"operationId":"users.remove","tags":["Authentication"],"description":"Removes a user from the system, provided their departure does not leave a group or an organization without the members it needs: a group must keep at least one member and one administrator, and an organization must keep at least one confirmed member.\nThe user is removed from every group and organization, and every custom permission they hold is dropped.\nOnly the current user can delete their own profile, but a user with the `partly_staff` permission can remove others.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_remove.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_remove.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.search":{"description":"Searches users by email or name.","post":{"operationId":"users.search","tags":["Authentication"],"description":"Searches users by email or name.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","title":"NonPaginatedList<auth.UsersSearchResponseItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.UsersSearchResponseItem"}}}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.signin":{"description":"Generates access token for a user verifying user email and password, or access token, or refresh token","post":{"operationId":"users.signin","tags":["Authentication"],"description":"Generates access token for a user verifying user email and password, or access token, or refresh token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersSignInRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersSignInResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersSignInError"}}}}}}},"/api/v1/users.signin-v2":{"description":"Signs a user in and takes the next step for them whenever there is only one to take: a user who belongs to exactly one organization is scoped to it, and if that organization has exactly one business they can sign in to, scoped to that too.\nResponds with `active`, the pair to make requests with, and `selected_organization_id` / `selected_business_id` saying how far the scoping got.\nA candidate that fails to verify is not an error: the response comes back scoped as far as it got, and the caller presents its picker for the rest.\nAlso switches an existing session: pass `access_token` with an `organization_id` (and optionally a `business_id`) and the token is rebuilt from the scope-free base, so it carries exactly one organization and at most one business rather than accumulating the old scope alongside the new one. A named organization or business that will not verify is an error, unlike the greedy path.","post":{"operationId":"users.signin-v2","tags":["Authentication"],"description":"Signs a user in and takes the next step for them whenever there is only one to take: a user who belongs to exactly one organization is scoped to it, and if that organization has exactly one business they can sign in to, scoped to that too.\nResponds with `active`, the pair to make requests with, and `selected_organization_id` / `selected_business_id` saying how far the scoping got.\nA candidate that fails to verify is not an error: the response comes back scoped as far as it got, and the caller presents its picker for the rest.\nAlso switches an existing session: pass `access_token` with an `organization_id` (and optionally a `business_id`) and the token is rebuilt from the scope-free base, so it carries exactly one organization and at most one business rather than accumulating the old scope alongside the new one. A named organization or business that will not verify is an error, unlike the greedy path.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_signin_v2.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_signin_v2.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_signin_v2.Error"}}}}}}},"/api/v1/users.staff-permissions.insert":{"description":"Adds staff-only permission scopes to a user. Scopes not listed are left untouched, as are all non-staff custom permissions. The caller may only add scopes their own admin scopes authorise: partly_admin authorises every staff-only scope, and each area admin (e.g. partly_qa_admin) authorises its base scope and itself. A user_id with no Partly account returns user_not_found — create the account with users.invite-v3 first.","post":{"operationId":"users.staff-permissions.insert","tags":["Authentication"],"description":"Adds staff-only permission scopes to a user. Scopes not listed are left untouched, as are all non-staff custom permissions. The caller may only add scopes their own admin scopes authorise: partly_admin authorises every staff-only scope, and each area admin (e.g. partly_qa_admin) authorises its base scope and itself. A user_id with no Partly account returns user_not_found — create the account with users.invite-v3 first.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.staff_permissions_insert.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.staff_permissions.UserStaffPermissions"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.staff_permissions.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.staff-permissions.remove":{"description":"Removes staff-only permission scopes from a user. Scopes not listed are left untouched, as are all non-staff custom permissions. Subject to the same admin-scope authorisation as users.staff-permissions.insert.","post":{"operationId":"users.staff-permissions.remove","tags":["Authentication"],"description":"Removes staff-only permission scopes from a user. Scopes not listed are left untouched, as are all non-staff custom permissions. Subject to the same admin-scope authorisation as users.staff-permissions.insert.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.staff_permissions_remove.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.staff_permissions.UserStaffPermissions"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.staff_permissions.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.uninvite":{"description":"Removes the user from a specific organization and all its groups.","post":{"operationId":"users.uninvite","tags":["Authentication"],"description":"Removes the user from a specific organization and all its groups.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersUninviteRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"description":"empty object","type":"object","properties":{}}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.UsersUninviteError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/users.update":{"description":"Updates user profile details.\nOnly the current user can update.","post":{"operationId":"users.update","tags":["Authentication"],"description":"Updates user profile details.\nOnly the current user can update.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_update.Request"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_update.Response"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth.users_update.Error"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/uvdb-properties.lookup":{"description":"Data Lookup API for UVDB properties","post":{"operationId":"uvdb-properties.lookup","tags":["Lookup"],"description":"Data Lookup API for UVDB properties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.UvdbPropertiesLookupRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.UvdbPropertiesLookupResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookup.LookupError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/uvdb-vehicle-definitions.get":{"description":"Endpoint for getting data about a specific vehicle definition","post":{"operationId":"uvdb-vehicle-definitions.get","tags":["OpenBase"],"description":"Endpoint for getting data about a specific vehicle definition","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseGetVehicleDataRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseGetVehicleDataResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/openbase.OpenbaseError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/uvdb.search":{"description":"Search UVDB properties","post":{"operationId":"uvdb.search","tags":["Uvdb"],"description":"Search UVDB properties","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uvdb.SearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uvdb.SearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uvdb.SearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/vehicles.search":{"description":"Endpoint for looking up vehicles based on provided search criteria.","post":{"operationId":"vehicles.search","tags":["tier1"],"description":"Endpoint for looking up vehicles based on provided search criteria.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VehicleSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VehicleSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VehicleSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/vrm.v2.search":{"description":"Async VRM lookup. Returns `in_progress { retry_after }` while the upstream provider call is queued or running, and `completed(...)` once a terminal result is cached. Frontends should poll on `in_progress`.","post":{"operationId":"vrm.v2.search","tags":["tier1"],"description":"Async VRM lookup. Returns `in_progress { retry_after }` while the upstream provider call is queued or running, and `completed(...)` once a terminal result is cached. Frontends should poll on `in_progress`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VrmRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VrmSearchOutcome"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier1.VehicleSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/work-provider.procurements.events.list":{"description":"List events for a procurement (work provider / insurer).","post":{"operationId":"work-provider.procurements.events.list","tags":["Procurement"],"description":"List events for a procurement (work provider / insurer).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.EventListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.EventListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.work_provider.EventListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/work-provider.procurements.get":{"description":"Get procurement details (work provider / insurer)","post":{"operationId":"work-provider.procurements.get","tags":["Procurement"],"description":"Get procurement details (work provider / insurer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementGetRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementGetResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.work_provider.ProcurementGetError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/work-provider.procurements.notes.list":{"description":"List notes for a procurement (work provider / insurer view).","post":{"operationId":"work-provider.procurements.notes.list","tags":["Procurement"],"description":"List notes for a procurement (work provider / insurer view).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteListRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.NoteListResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.work_provider.NoteListError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}},"/api/v1/work-provider.procurements.search":{"description":"Search procurements (work provider / insurer)","post":{"operationId":"work-provider.procurements.search","tags":["Procurement"],"description":"Search procurements (work provider / insurer)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementSearchRequest"}}},"required":true},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.repairer.ProcurementSearchResponse"}}}},"default":{"description":"Error cases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/procurement.work_provider.ProcurementSearchError"}}}}},"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"$ref":"#/components/schemas/std.string.String"}}]}}},"components":{"schemas":{"Address":{"type":"object","title":"Address","properties":{"city":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"country_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"geo":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/GeoLocation"}]},"name":{"deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"postcode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"street_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"street_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"suburb":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"time_zone":{"$ref":"#/components/schemas/std.string.String"},"unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"EditionMatchCondition":{"oneOf":[{"type":"object","title":"edition","required":["edition"],"properties":{"edition":{"$ref":"#/components/schemas/u64"}}}]},"ForwardPagination":{"type":"object","title":"ForwardPagination","required":["next_cursor"],"properties":{"next_cursor":{"description":"The cursor to the next page if it exists","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"ForwardPaginationWithTotal":{"type":"object","title":"ForwardPaginationWithTotal","required":["next_cursor","total_count"],"properties":{"next_cursor":{"description":"The cursor to the next page if it exists.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_count":{"description":"Total number of items matching the request, ignoring `cursor` / `limit`.","$ref":"#/components/schemas/i64"}}},"GeoLocation":{"type":"object","title":"GeoLocation","required":["latitude","longitude"],"properties":{"latitude":{"$ref":"#/components/schemas/f64"},"longitude":{"$ref":"#/components/schemas/f64"}}},"IfExistsAbortOrIgnore":{"oneOf":[{"const":"abort"},{"const":"ignore"}]},"IfExistsOnIngestInsert":{"oneOf":[{"const":"replace"},{"const":"replace_all"},{"const":"update"},{"const":"abort"},{"const":"ignore"}]},"IfExistsOnIngestInsertIdempotent":{"oneOf":[{"const":"replace"},{"const":"replace_all"},{"const":"update"},{"const":"ignore"}]},"IfExistsReplace":{"oneOf":[{"const":"replace"}]},"IfExistsReplaceAll":{"oneOf":[{"const":"replace_all"}]},"IfExistsUpdate":{"oneOf":[{"const":"update"}]},"IfNotExistsAbort":{"oneOf":[{"const":"abort"}]},"IfNotExistsAbortOrIgnore":{"oneOf":[{"const":"abort"},{"const":"ignore"}]},"InternalError":{"type":"object","title":"InternalError","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/std.string.String"}}},"LanguageString":{"type":"object","title":"LanguageString","required":["language","value"],"properties":{"language":{"$ref":"#/components/schemas/std.string.String"},"value":{"$ref":"#/components/schemas/std.string.String"}}},"MatchCondition":{"oneOf":[{"const":"exists"},{"type":"object","title":"edition","required":["edition"],"properties":{"edition":{"$ref":"#/components/schemas/u64"}}}]},"PageRequest":{"type":"object","title":"PageRequest","properties":{"cursor":{"description":"Cursor where to start from,\nIt is set by a client to a value equal to next_cursor or previous_cursor\nA server will recognize which one it is automatically","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"limit":{"description":"How many items to return in a response.\nPlease note it is only a recommendation,\na server can return fewer items than requested.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"analytics.AnalyticsEventInsertData":{"type":"object","title":"analytics.AnalyticsEventInsertData","required":["name","properties"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"properties":{"$ref":"#/components/schemas/serde_json.Value"}}},"analytics.AnalyticsEventsInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"analytics.AnalyticsEventsInsertRequest":{"description":"Request to log a single analytics event","type":"object","title":"analytics.AnalyticsEventsInsertRequest","required":["events"],"properties":{"events":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/analytics.AnalyticsEventInsertData"}}}},"analytics.AnalyticsEventsInsertResponse":{"description":"Response for analytics operations (empty success response)","type":"object","title":"analytics.AnalyticsEventsInsertResponse","properties":{}},"auth.AuthError":{"oneOf":[{"type":"object","title":"invalid_token","required":["invalid_token"],"properties":{"invalid_token":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"revoked_token"}]},"auth.FederatedAuthRequestError":{"oneOf":[{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"$ref":"#/components/schemas/u64"}}},{"type":"object","title":"identity_provider_not_configured","required":["identity_provider_not_configured"],"properties":{"identity_provider_not_configured":{"$ref":"#/components/schemas/auth.IdentityProvider"}}},{"type":"object","title":"invalid_redirect_url","required":["invalid_redirect_url"],"properties":{"invalid_redirect_url":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_environment_type","required":["invalid_environment_type"],"properties":{"invalid_environment_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_state","required":["invalid_state"],"properties":{"invalid_state":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_pkce_challenge","required":["invalid_pkce_challenge"],"properties":{"invalid_pkce_challenge":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.FederatedAuthRequestRequest":{"type":"object","title":"auth.FederatedAuthRequestRequest","required":["idp","pkce_challenge","redirect_url","state"],"properties":{"idp":{"$ref":"#/components/schemas/auth.IdentityProvider"},"pkce_challenge":{"$ref":"#/components/schemas/std.string.String"},"redirect_url":{"$ref":"#/components/schemas/std.string.String"},"state":{"$ref":"#/components/schemas/std.string.String"}}},"auth.FederatedAuthRequestResponse":{"type":"object","title":"auth.FederatedAuthRequestResponse","required":["auth_url"],"properties":{"auth_url":{"$ref":"#/components/schemas/std.string.String"}}},"auth.GroupMemberModel":{"type":"object","title":"auth.GroupMemberModel","required":["email","id","name"],"properties":{"email":{"description":"User email","$ref":"#/components/schemas/std.string.String"},"id":{"description":"User id","$ref":"#/components/schemas/uuid.Uuid"},"is_admin":{"description":"Indicates whether the user has administrative privileges for this group.","$ref":"#/components/schemas/bool"},"name":{"description":"User name","$ref":"#/components/schemas/std.string.String"}}},"auth.GroupModel":{"type":"object","title":"auth.GroupModel","required":["id","name"],"properties":{"id":{"description":"Assigned id, immutable","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"Human readable name of the group, mutable","$ref":"#/components/schemas/std.string.String"},"permissions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}}}},"auth.IdentityProvider":{"oneOf":[{"const":"google"},{"const":"microsoft"}]},"auth.InsurersVerifyError":{"oneOf":[{"const":"forbidden"},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}}]},"auth.InsurersVerifyRequest":{"type":"object","title":"auth.InsurersVerifyRequest","required":["insurer_id"],"properties":{"insurer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.OrganizationAuthorizationDetails":{"type":"object","title":"auth.OrganizationAuthorizationDetails","required":["entitlements","id","permissions"],"properties":{"country_code":{"description":"The country that the organization belongs to\n\nFor backwards compatibility it is nullable","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"entitlements":{"description":"A vector of entitlement codes that the current token has access to\nAn entitlement is derived from a subscription to a billing product that an organization currently owns","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"id":{"description":"Organization ID","$ref":"#/components/schemas/uuid.Uuid"},"integration_id":{"description":"Populated when the token (API Key) belongs to an integration","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"permissions":{"description":"A vector of permissions associated with the organization, used for access control.\n\nEach permission is an object containing a `scope` (e.g., `job_viewers`, `order_approvers`) and an `entity` (e.g., `site_id`, `organization_id`, `repairer_business_id`).","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}}}},"auth.OrganizationsApiKeyInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"auth.OrganizationsApiKeyInsertRequest":{"type":"object","title":"auth.OrganizationsApiKeyInsertRequest","required":["expires_at","name"],"properties":{"expires_at":{"description":"Required expiration time of the key\nIt is fine to set it to 1000 years\nif a user does not want to have it expired anytime soon.","type":"string","format":"date-time"},"name":{"description":"Human readable name of a key for a user to recognise it","$ref":"#/components/schemas/std.string.String"}}},"auth.OrganizationsApiKeyInsertResponse":{"type":"object","title":"auth.OrganizationsApiKeyInsertResponse","required":["api_key"],"properties":{"api_key":{"$ref":"#/components/schemas/std.string.String"}}},"auth.OrganizationsApiKeyListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"auth.OrganizationsApiKeyListItem":{"type":"object","title":"auth.OrganizationsApiKeyListItem","required":["created_at","creator_id","id","name"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"creator_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"auth.OrganizationsApiKeyListResponse":{"type":"object","title":"auth.OrganizationsApiKeyListResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.OrganizationsApiKeyListItem"}}}},"auth.OrganizationsApiKeyRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"auth.OrganizationsApiKeyRemoveRequest":{"type":"object","title":"auth.OrganizationsApiKeyRemoveRequest","required":["id"],"properties":{"id":{"description":"ID of the API key to remove","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.OrganizationsVerifyError":{"oneOf":[{"const":"forbidden"},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}}]},"auth.OrganizationsVerifyRequest":{"type":"object","title":"auth.OrganizationsVerifyRequest","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.RepairersVerifyError":{"oneOf":[{"const":"forbidden"},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}}]},"auth.RepairersVerifyRequest":{"type":"object","title":"auth.RepairersVerifyRequest","required":["repairer_id"],"properties":{"repairer_id":{"description":"Currently Repairer app can work within the context of the single repairer business entity","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.ServiceAccountKeySummary":{"type":"object","title":"auth.ServiceAccountKeySummary","required":["created_at","expires_at","id","name","revoked_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"expires_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"revoked_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"auth.StaffScope":{"oneOf":[{"const":"partly_staff"},{"const":"partly_qa_staff"},{"const":"partly_staff_billing"},{"const":"partly_ghca_standards_editor"},{"const":"partly_staff_ai"},{"const":"partly_admin"},{"const":"partly_staff_admin"},{"const":"partly_qa_admin"},{"const":"partly_billing_admin"},{"const":"partly_ghca_admin"},{"const":"partly_ai_admin"}]},"auth.SuppliersVerifyError":{"oneOf":[{"const":"forbidden"},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}}]},"auth.UserIdentity":{"oneOf":[{"description":"Existing user by UUID.","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"User identified by email (may or may not exist).","type":"object","title":"email","required":["email"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.UsersGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"type":"object","title":"user_not_found","required":["user_not_found"],"properties":{"user_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"forbidden"}]},"auth.UsersGetRequest":{"type":"object","title":"auth.UsersGetRequest","properties":{"id":{"description":"Id of a user to return information for.\nIf not specified, returns for the current user","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"auth.UsersGetResponse":{"type":"object","title":"auth.UsersGetResponse","required":["email","id","name"],"properties":{"email":{"description":"User email","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"description":"User id","$ref":"#/components/schemas/uuid.Uuid"},"mobile_phone":{"description":"User mobile phone","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"description":"User name","$ref":"#/components/schemas/std.string.String"}}},"auth.UsersHubspotIdentifyError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"auth.UsersHubspotIdentifyResponse":{"type":"object","title":"auth.UsersHubspotIdentifyResponse","required":["token"],"properties":{"token":{"description":"Visitor identification token to pass to HubSpot chat widget","$ref":"#/components/schemas/std.string.String"}}},"auth.UsersInviteV2EmailBehaviour":{"oneOf":[{"const":"immediate_email"},{"const":"no_email"}]},"auth.UsersPasswordResetError":{"oneOf":[{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"$ref":"#/components/schemas/u64"}}}]},"auth.UsersPasswordResetRequest":{"type":"object","title":"auth.UsersPasswordResetRequest","required":["email"],"properties":{"email":{"description":"Users email","$ref":"#/components/schemas/std.string.String"}}},"auth.UsersPasswordUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"weak_password"},{"const":"password_with_leading_or_trailing_whitespace"},{"const":"forbidden"},{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"$ref":"#/components/schemas/u64"}}}]},"auth.UsersPasswordUpdateRequest":{"type":"object","title":"auth.UsersPasswordUpdateRequest","required":["new_password"],"properties":{"new_password":{"description":"New user's password","$ref":"#/components/schemas/std.string.String"}}},"auth.UsersSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"filter_too_short"}]},"auth.UsersSearchRequest":{"oneOf":[{"description":"Searches by exact email.\nThis request variant is used for inviting a user to the organization.","type":"object","title":"email","required":["email"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Searches by partial name or email.\nFilter must be at least 3 characters long.\nThis request variant is used for inviting a user to the organization group.\nUser should be in the organization already.\nFilter must be at least 3 characters long.","type":"object","title":"partial_name_or_email","required":["partial_name_or_email"],"properties":{"partial_name_or_email":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.UsersSearchResponseItem":{"type":"object","title":"auth.UsersSearchResponseItem","required":["id","name"],"properties":{"id":{"description":"User id","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"User name","$ref":"#/components/schemas/std.string.String"}}},"auth.UsersSignInError":{"oneOf":[{"type":"object","title":"authorization_issuer_forbidden","required":["authorization_issuer_forbidden"],"properties":{"authorization_issuer_forbidden":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"invalid_email_or_password"},{"const":"inactive"},{"type":"object","title":"authorization_issuer","required":["authorization_issuer"],"properties":{"authorization_issuer":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"$ref":"#/components/schemas/u64"}}},{"const":"invalid_auth_code"},{"const":"sso_login_required"},{"const":"integrations_forbidden"},{"type":"object","title":"authorization_issuer_not_upgradable","required":["authorization_issuer_not_upgradable"],"properties":{"authorization_issuer_not_upgradable":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.UsersSignInRequest":{"oneOf":[{"description":"Used by the signin up when a user needs to open a new session in a browser.","type":"object","title":"New","required":["email","password"],"properties":{"authorization_issuer":{"description":"If signin comes from a specific application or has a backlink to go to after signin,\nthe application may provide with the `authorization_issuer` field.\nThis provided URL will be called to obtain additional authorization details,\nwhich are then injected into the result access token.\nThe provided URL can be also relative to the current API server.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"authorization_parameters":{"description":"If this field is defined, it will be forwarded to the\nauthorization issuer in the request body","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"email":{"description":"User's email","$ref":"#/components/schemas/std.string.String"},"password":{"description":"User's password","$ref":"#/components/schemas/std.string.String"}}},{"description":"Can be used by an application to exchange a refresh token for a new access token before it expires.","type":"object","title":"Refresh","required":["refresh_token"],"properties":{"refresh_token":{"description":"Active refresh token issued previously for a user","$ref":"#/components/schemas/std.string.String"}}},{"description":"Can be used by an application to exchange one access token for another,\nwith different authorization details, and optionally expiration time.","type":"object","title":"Upgrade","required":["access_token","authorization_issuer"],"properties":{"access_token":{"description":"Active access token issued previously for a user","$ref":"#/components/schemas/std.string.String"},"authorization_issuer":{"description":"If signin comes from a specific application or has a backlink to go to after signin,\nthe application may provide with the `authorization_issuer` field.\nThis provided URL will be called to obtain additional authorization details,\nwhich are then injected into the result access token.\nThe provided URL can be also relative to the current API server.\nIf the `details` field is also provided, then the authorization issuer\nshould take care of limiting the authorization details to\nthe narrowest possible set of permissions, for example\nto a specific integration ID with write access only to sellables.","$ref":"#/components/schemas/std.string.String"},"authorization_parameters":{"description":"If this field is defined, it will be forwarded to the\nauthorization issuer in the request body","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]}}},{"description":"This is used to finish federated authentication flows\nwhere the user logs in via an external identity provider\n(like Google or Microsoft) and the application needs to exchange the authorization code\nfor an identity token to access the user's data.\nThe application should first call `federated_auth_request` to get the redirect URL\nand then redirect the user to that URL.\nAfter the user logs in and grants access to the application,\nthe identity provider will redirect the user back to the application with an authorization code.\nThe application should then call this endpoint with the authorization code.","type":"object","title":"FederatedAuthCode","required":["auth_code","pkce_verifier","redirect_url"],"properties":{"auth_code":{"description":"Authorization code issued by BE after the user has logged in and granted access at IdP.\nThis code is used to exchange for an access/refresh tokens.\nIt is short-lived and can be used only once.","$ref":"#/components/schemas/std.string.String"},"pkce_verifier":{"description":"PKCE verifier used to verify the authorization code\nThis is used to prevent replay attacks and ensure that the authorization code\nwas obtained by the same FE that is now trying to exchange it for tokens.","$ref":"#/components/schemas/std.string.String"},"redirect_url":{"description":"Redirect URL to which FE was redirected after successful sign-in at IdP.\nIt should be populated by the current FE URL and must match the one used in the initial request\nto `federated_auth_request`. This is used to prevent open redirect vulnerabilities.","$ref":"#/components/schemas/std.string.String"}}}]},"auth.UsersSignInResponse":{"type":"object","title":"auth.UsersSignInResponse","required":["access_token","refresh_token"],"properties":{"access_token":{"description":"JWT access token","$ref":"#/components/schemas/std.string.String"},"refresh_token":{"description":"JWT refresh token, if available","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"auth.UsersUninviteError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"auth.UsersUninviteRequest":{"type":"object","title":"auth.UsersUninviteRequest","required":["id"],"properties":{"id":{"description":"User id who should be removed from the current organization","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.groups_insert.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"group_already_exists","required":["group_already_exists"],"properties":{"group_already_exists":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"admin_group_already_exists","required":["admin_group_already_exists"],"properties":{"admin_group_already_exists":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.groups_insert.Request":{"type":"object","title":"auth.groups_insert.Request","required":["name"],"properties":{"name":{"description":"Group name","$ref":"#/components/schemas/std.string.String"},"permissions":{"description":"Group permissions","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}}}},"auth.groups_insert.Response":{"type":"object","title":"auth.groups_insert.Response","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.groups_list.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"auth.groups_list.Request":{"type":"object","title":"auth.groups_list.Request","properties":{"with_membership":{"description":"Restrict the result to groups that the user is a member of","$ref":"#/components/schemas/bool"}}},"auth.groups_members_insert.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"auth.groups_members_insert.Request":{"type":"object","title":"auth.groups_members_insert.Request","required":["group_id","is_admin","user_id"],"properties":{"group_id":{"description":"The id of the group in the current organization","$ref":"#/components/schemas/uuid.Uuid"},"is_admin":{"description":"The flag whether the user should be admin of the group or not","$ref":"#/components/schemas/bool"},"user_id":{"description":"The id of the user who should be added to the group","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.groups_members_list.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"cursor_not_valid"}]},"auth.groups_members_list.Request":{"type":"object","title":"auth.groups_members_list.Request","required":["group_id"],"properties":{"group_id":{"description":"The id of the group in the current organization","$ref":"#/components/schemas/uuid.Uuid"},"pagination":{"description":"Pagination parameters for forward paging.","$ref":"#/components/schemas/PageRequest"}}},"auth.groups_members_remove.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"group_member_not_found","required":["group_member_not_found"],"properties":{"group_member_not_found":{"type":"object","title":"group_member_not_found","required":["group_id","user_id"],"properties":{"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"auth.groups_members_remove.Request":{"type":"object","title":"auth.groups_members_remove.Request","required":["group_id","user_id"],"properties":{"group_id":{"description":"The id of the group in the current organization","$ref":"#/components/schemas/uuid.Uuid"},"user_id":{"description":"The id of the user who should be removed from the group","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.groups_remove.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"group_not_exists","required":["group_not_exists"],"properties":{"group_not_exists":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"group_is_used"}]},"auth.groups_remove.Request":{"type":"object","title":"auth.groups_remove.Request","required":["id"],"properties":{"id":{"description":"Group id","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.groups_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"group_does_not_exist","required":["group_does_not_exist"],"properties":{"group_does_not_exist":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"group_name_not_unique","required":["group_name_not_unique"],"properties":{"group_name_not_unique":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.groups_update.Request":{"type":"object","title":"auth.groups_update.Request","required":["id"],"properties":{"id":{"description":"Group id","$ref":"#/components/schemas/uuid.Uuid"},"new_name":{"description":"The new group name. Name must be unique across entire organization","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"new_permissions":{"description":"The new permissions that will be applied to the group","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}}]}}},"auth.groups_update.Response":{"type":"object","title":"auth.groups_update.Response","required":["id","name","permissions"],"properties":{"id":{"description":"Group id","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"Group name","$ref":"#/components/schemas/std.string.String"},"permissions":{"description":"The new permissions that has been applied to the group","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}}}},"auth.organizations_customization_get.OrganizationCustomizationModel":{"allOf":[{"$ref":"#/components/schemas/business_network.OrganizationCustomization"},{"description":"The customization blob plus `logo_url`, which lives on the profile itself\nrather than in the blob — one organization has one logo, and the branding\nsurfaces and the quote builder both draw it from there.","type":"object","title":"auth.organizations_customization_get.OrganizationCustomizationModel","properties":{"logo_url":{"description":"Absolute URL to the org's logo image","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"auth.organizations_customization_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"organization_not_exist"}]},"auth.organizations_customization_update.Request":{"description":"**Beta — unstable.** See [`accounts_dal::OrganizationCustomization`] for change policy.\n`reflectapi::Option` fields distinguish \"leave unchanged\" (Undefined) from \"clear\" (None).","type":"object","title":"auth.organizations_customization_update.Request","required":["id"],"properties":{"allow_disallowed_offers":{"description":"Allow offers with a DISALLOW evaluation outcome to be selectable","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"dedupe_single_supplier_baskets":{"description":"Remove single-supplier baskets when the split basket covers only one supplier","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"enable_part_verification":{"description":"Enable part-number verification via the interpreter service","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"favicon":{"description":"Absolute URL to the org's favicon","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hide_offer_recommendation_alerts":{"description":"Hide offer recommendation alerts","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"},"job_table_columns":{"description":"Which columns to show in the jobs table","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.JobTableColumn"}}]},"logo_url":{"description":"Absolute URL to the org's logo image","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_note_label":{"description":"Override the order note field label","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_note_required":{"description":"Make the order note field required","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"page_title":{"description":"HTML page title for white-label","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"recommend_basket_label":{"description":"Override the \"Recommended\" basket label (e.g. \"Required\")","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"show_order_feedback":{"description":"Show order feedback dropdown on the order page","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"show_repairer_settings_dialog":{"description":"Show the repairer settings dialog link in the navigation header","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"skip_job_setup_flow":{"description":"Skip redirecting to the job-setup flow after creating a job","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"skip_prefetch_orchestrated_parts":{"description":"Skip prefetching orchestrated parts when a job reaches exact-ready state","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"use_mfr_type_badges":{"description":"Display OEM/OES/Aftermarket condition badges instead of grade A/B/C","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"auth.organizations_get.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"organization_not_found","required":["organization_not_found"],"properties":{"organization_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"auth.organizations_get.Request":{"type":"object","title":"auth.organizations_get.Request","required":["id"],"properties":{"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.organizations_get.Response":{"type":"object","title":"auth.organizations_get.Response","required":["admin_group","contact","country_code","created_at","groups","id","is_test_organization","name","sso_required","status","updated_at"],"properties":{"admin_group":{"description":"Organization admin group details","$ref":"#/components/schemas/auth.GroupModel"},"contact":{"description":"Organization contact details","$ref":"#/components/schemas/business_network.OrganizationContact"},"country_code":{"description":"ISO 3166-1 alpha-3 country code","$ref":"#/components/schemas/iso_country.CountryCode"},"created_at":{"description":"Timestamp indicating when the organization was created","type":"string","format":"date-time"},"groups":{"description":"All other organization groups details","type":"array","items":{"$ref":"#/components/schemas/auth.GroupModel"}},"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"},"is_test_organization":{"description":"Whether this organization is a test organization.","$ref":"#/components/schemas/bool"},"name":{"description":"Organization name","$ref":"#/components/schemas/std.string.String"},"sso_required":{"description":"Indicates whether SSO login is required for this organization.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"status":{"description":"Organization status","$ref":"#/components/schemas/business_network.OrganizationStatus"},"updated_at":{"description":"Timestamp indicating when the organization was last modified","type":"string","format":"date-time"}}},"auth.organizations_get_v2.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"organization_not_found","required":["organization_not_found"],"properties":{"organization_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"auth.organizations_get_v2.Request":{"type":"object","title":"auth.organizations_get_v2.Request","required":["id"],"properties":{"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.organizations_get_v2.Response":{"type":"object","title":"auth.organizations_get_v2.Response","required":["private_profile","public_profile"],"properties":{"private_profile":{"description":"Present only when the caller is a member of this organization, or is\nPartly staff.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.PrivateOrganizationProfile"}]},"public_profile":{"description":"Always present.","$ref":"#/components/schemas/business_network.PublicOrganizationProfile"}}},"auth.organizations_insert.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"organization_already_exists","required":["organization_already_exists"],"properties":{"organization_already_exists":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.organizations_insert.Request":{"type":"object","title":"auth.organizations_insert.Request","required":["contact","country_code","currency_code","is_test_organization","name"],"properties":{"contact":{"description":"Organization contact details","$ref":"#/components/schemas/business_network.OrganizationContact"},"country_code":{"description":"ISO 3166-1 alpha-3 country code (e.g. \"GBR\", \"NZL\"). Required.","$ref":"#/components/schemas/iso_country.CountryCode"},"currency_code":{"description":"ISO4217 currency code (e.g. \"GBP\", \"NZD\"). Required.","$ref":"#/components/schemas/iso_currency.CurrencyCode"},"is_test_organization":{"description":"Whether this organization is a test account. Required.","$ref":"#/components/schemas/bool"},"is_unclaimed":{"description":"Whether the organization was created on behalf of a user who has not yet claimed ownership.\n\nDefaults to `false`. This is typically used when the organization is created\nto represent an external entity (e.g. supplier) before they have\nofficially joined and claimed their account.","$ref":"#/components/schemas/bool"},"logo_url":{"description":"Organization logo URL","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"description":"Organization name (should be unique)","$ref":"#/components/schemas/std.string.String"},"off_network_email_options":{"description":"Off-network email options","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OffNetworkEmailOptions"}]},"sso_required":{"description":"Indicates whether SSO login is required for this organization. Optional; defaults to `false`.","$ref":"#/components/schemas/bool"}}},"auth.organizations_insert.Response":{"type":"object","title":"auth.organizations_insert.Response","required":["admin_group_id","id"],"properties":{"admin_group_id":{"description":"Organization admin group id","$ref":"#/components/schemas/uuid.Uuid"},"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"}}},"auth.organizations_list.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"auth.organizations_list.OrganizationModel":{"description":"Organization as returned by `organizations.list`.\n\nOwned by this endpoint. `organizations.search` keeps its own copy, and both\nare removed with their endpoints once `organizations.search-v2` replaces them.","type":"object","title":"auth.organizations_list.OrganizationModel","required":["country_code","id","name"],"properties":{"country_code":{"description":"ISO 3166-1 alpha-3 country code","$ref":"#/components/schemas/iso_country.CountryCode"},"id":{"description":"Assigned id, immutable","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"Human readable name of the organization, mutable","$ref":"#/components/schemas/std.string.String"},"status":{"description":"Status of the organization","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OrganizationStatus"}]}}},"auth.organizations_search.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"filter_too_short"}]},"auth.organizations_search.OrganizationModel":{"description":"Organization as returned by `organizations.search`.\n\nOwned by this endpoint. `organizations.list` keeps its own copy, and both\nare removed with their endpoints once `organizations.search-v2` replaces them.","type":"object","title":"auth.organizations_search.OrganizationModel","required":["country_code","id","name"],"properties":{"country_code":{"description":"ISO 3166-1 alpha-3 country code","$ref":"#/components/schemas/iso_country.CountryCode"},"id":{"description":"Assigned id, immutable","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"Human readable name of the organization, mutable","$ref":"#/components/schemas/std.string.String"},"status":{"description":"Status of the organization","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OrganizationStatus"}]}}},"auth.organizations_search.Request":{"type":"object","title":"auth.organizations_search.Request","required":["filter"],"properties":{"filter":{"description":"Searches by a partial name.\nThe filter must be at least 3 characters long.","$ref":"#/components/schemas/std.string.String"}}},"auth.organizations_search_v2.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"cursor_not_valid"}]},"auth.organizations_search_v2.MembershipFilter":{"oneOf":[{"const":"member","description":"Only organizations the user is a member of. Partly staff are treated as\na member of every organization."},{"const":"any","description":"Every organization, regardless of membership"}]},"auth.organizations_search_v2.Request":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"type":"object","title":"auth.organizations_search_v2.Request","properties":{"membership":{"description":"Which organizations to search across. Defaults to the caller's own.","$ref":"#/components/schemas/auth.organizations_search_v2.MembershipFilter"},"name_filter":{"description":"Case-insensitive substring of the organization name.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_ids":{"description":"Restrict the search to these organization ids.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]}}}]},"auth.organizations_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"organization_not_exist"},{"const":"organization_empty_name_for_update"},{"const":"missing_organization_contact"},{"type":"object","title":"organization_already_exists","required":["organization_already_exists"],"properties":{"organization_already_exists":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.organizations_update.Request":{"type":"object","title":"auth.organizations_update.Request","required":["id"],"properties":{"contact":{"description":"Organization contact details","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OrganizationContact"}]},"country_code":{"description":"ISO 3166-1 alpha-3 country code (e.g. \"GBR\", \"NZL\"). Required field:\nomit to leave unchanged, but it cannot be cleared to null.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"currency_code":{"description":"ISO4217 currency code (e.g. \"GBP\", \"NZD\")","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_currency.CurrencyCode"}]},"email_options":{"description":"General outbound-email options (the org's sender selection)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.EmailOptions"}]},"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"},"is_test_organization":{"description":"Whether this organization is a test organization.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"logo_url":{"description":"Organization logo URL","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"description":"Organization name","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"off_network_email_options":{"description":"Off-network email options","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OffNetworkEmailOptions"}]},"sso_required":{"description":"Indicates whether SSO login is required for this organization.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"auth.organizations_update.Response":{"type":"object","title":"auth.organizations_update.Response","required":["contact","country_code","email_options","id","is_test_organization","logo_url","name","off_network_email_options","status"],"properties":{"contact":{"description":"Organization contact details","$ref":"#/components/schemas/business_network.OrganizationContact"},"country_code":{"description":"ISO 3166-1 alpha-3 country code","$ref":"#/components/schemas/iso_country.CountryCode"},"email_options":{"description":"General outbound-email options (the org's sender selection)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.EmailOptions"}]},"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"},"is_test_organization":{"description":"Whether this organization is a test organization.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"logo_url":{"description":"Organization logo URL","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"description":"Organization name","$ref":"#/components/schemas/std.string.String"},"off_network_email_options":{"description":"Off-network email options","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OffNetworkEmailOptions"}]},"status":{"description":"Organization status","$ref":"#/components/schemas/business_network.OrganizationStatus"}}},"auth.organizations_update_v2.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"organization_not_exist"},{"const":"organization_empty_name_for_update"},{"const":"missing_organization_contact"},{"type":"object","title":"organization_already_exists","required":["organization_already_exists"],"properties":{"organization_already_exists":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.organizations_update_v2.Request":{"description":"Every field distinguishes \"leave unchanged\" (Undefined) from \"clear\" (None).\nThe customization flags are **beta — unstable**; see\n[`accounts_dal::OrganizationCustomization`] for change policy.","type":"object","title":"auth.organizations_update_v2.Request","required":["id"],"properties":{"allow_disallowed_offers":{"description":"Allow offers with a DISALLOW evaluation outcome to be selectable","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"contact":{"description":"Organization contact details. Cannot be cleared.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OrganizationContact"}]},"country_code":{"description":"ISO 3166-1 alpha-3 country code (e.g. \"GBR\", \"NZL\"). Cannot be cleared.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"currency_code":{"description":"ISO4217 currency code (e.g. \"GBP\", \"NZD\"). Cannot be cleared.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_currency.CurrencyCode"}]},"dedupe_single_supplier_baskets":{"description":"Remove single-supplier baskets when the split basket covers only one supplier","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"email_options":{"description":"General outbound-email options (the org's sender selection)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.EmailOptions"}]},"enable_part_verification":{"description":"Enable part-number verification via the interpreter service","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"favicon":{"description":"Absolute URL to the org's favicon","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hide_offer_recommendation_alerts":{"description":"Hide offer recommendation alerts","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"id":{"description":"Organization id","$ref":"#/components/schemas/uuid.Uuid"},"is_test_organization":{"description":"Whether this organization is a test organization. Partly staff only.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"job_table_columns":{"description":"Which columns to show in the jobs table","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.JobTableColumn"}}]},"logo_url":{"description":"Absolute URL to the org's logo image","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"description":"Organization name. Cannot be cleared.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"off_network_email_options":{"description":"Off-network email options","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OffNetworkEmailOptions"}]},"order_note_label":{"description":"Override the order note field label","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_note_required":{"description":"Make the order note field required","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"page_title":{"description":"HTML page title for white-label","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"recommend_basket_label":{"description":"Override the \"Recommended\" basket label (e.g. \"Required\")","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"show_order_feedback":{"description":"Show order feedback dropdown on the order page","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"show_repairer_settings_dialog":{"description":"Show the repairer settings dialog link in the navigation header","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"skip_job_setup_flow":{"description":"Skip redirecting to the job-setup flow after creating a job","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"skip_prefetch_orchestrated_parts":{"description":"Skip prefetching orchestrated parts when a job reaches exact-ready state","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"sso_required":{"description":"Indicates whether SSO login is required for this organization. Partly staff only.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"timezone":{"description":"A timezone definition (IANA), like \"Pacific/Auckland\" or \"Europe/London\".","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"use_mfr_type_badges":{"description":"Display OEM/OES/Aftermarket condition badges instead of grade A/B/C","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"auth.organizations_users_list.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"cursor_not_valid"}]},"auth.organizations_users_list.OrganizationsUsersListItem":{"type":"object","title":"auth.organizations_users_list.OrganizationsUsersListItem","required":["email","id","invitation_status","joined_at","name"],"properties":{"email":{"description":"User email address.","$ref":"#/components/schemas/std.string.String"},"id":{"description":"User id.","$ref":"#/components/schemas/uuid.Uuid"},"invitation_status":{"description":"Status of the user's invitation.","$ref":"#/components/schemas/business_network.UserInvitationStatus"},"joined_at":{"description":"Timestamp when the user joined the organization.","type":"string","format":"date-time"},"name":{"description":"User full name.","$ref":"#/components/schemas/std.string.String"}}},"auth.organizations_users_list.Request":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"type":"object","title":"auth.organizations_users_list.Request","properties":{"invitation_statuses":{"description":"Filter users by invitation status.","type":"array","items":{"$ref":"#/components/schemas/business_network.UserInvitationStatus"}}}}]},"auth.organizations_users_search.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"},{"const":"query_too_long"}]},"auth.organizations_users_search.OrganizationsUsersSearchItem":{"type":"object","title":"auth.organizations_users_search.OrganizationsUsersSearchItem","required":["email","id","name"],"properties":{"email":{"description":"User email address.","$ref":"#/components/schemas/std.string.String"},"id":{"description":"User id.","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"User full name.","$ref":"#/components/schemas/std.string.String"}}},"auth.organizations_users_search.Request":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"type":"object","title":"auth.organizations_users_search.Request","properties":{"query":{"description":"Optional partial name or email. Empty / missing = browse all members.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"auth.staff_permissions.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"no_scopes"},{"type":"object","title":"not_authorized_for_scope","required":["not_authorized_for_scope"],"properties":{"not_authorized_for_scope":{"$ref":"#/components/schemas/auth.StaffScope"}}},{"const":"user_not_found"}]},"auth.staff_permissions.UserStaffPermissions":{"type":"object","title":"auth.staff_permissions.UserStaffPermissions","required":["email","scopes","user_id"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"},"scopes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.StaffScope"}},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.staff_permissions_insert.Request":{"type":"object","title":"auth.staff_permissions_insert.Request","required":["scopes","user_id"],"properties":{"scopes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.StaffScope"}},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.staff_permissions_remove.Request":{"type":"object","title":"auth.staff_permissions_remove.Request","required":["scopes","user_id"],"properties":{"scopes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.StaffScope"}},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.users_confirm_v2.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"empty_name"},{"type":"object","title":"invalid_email_format","required":["invalid_email_format"],"properties":{"invalid_email_format":{"type":"object","title":"invalid_email_format","required":["email"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"weak_password"},{"const":"password_with_leading_or_trailing_whitespace"},{"const":"password_required"},{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"$ref":"#/components/schemas/u64"}}}]},"auth.users_confirm_v2.Outcome":{"oneOf":[{"const":"email_confirmed"},{"type":"object","title":"organization_joined","required":["organization_joined"],"properties":{"organization_joined":{"type":"object","title":"organization_joined","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"const":"password_set"}]},"auth.users_confirm_v2.Request":{"type":"object","title":"auth.users_confirm_v2.Request","properties":{"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"password":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"auth.users_confirm_v2.Response":{"type":"object","title":"auth.users_confirm_v2.Response","required":["email","outcome","user_id"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"},"outcome":{"$ref":"#/components/schemas/auth.users_confirm_v2.Outcome"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.users_exchange_sessions_accept.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_code"},{"const":"inactive"},{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"type":"object","title":"too_many_attempts","required":["retry_after_secs"],"properties":{"retry_after_secs":{"$ref":"#/components/schemas/u64"}}}}}]},"auth.users_exchange_sessions_accept.Request":{"type":"object","title":"auth.users_exchange_sessions_accept.Request","required":["code"],"properties":{"code":{"$ref":"#/components/schemas/std.string.String"}}},"auth.users_exchange_sessions_offer.EndReason":{"oneOf":[{"const":"expired"},{"const":"unavailable"}]},"auth.users_exchange_sessions_offer.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"too_many_streams"}]},"auth.users_exchange_sessions_offer.Frame":{"oneOf":[{"type":"object","title":"offered","required":["code","expires_at","link","rotates_at","type"],"properties":{"code":{"$ref":"#/components/schemas/std.string.String"},"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"link":{"$ref":"#/components/schemas/std.string.String"},"rotates_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"type":{"const":"offered"}}},{"type":"object","title":"heartbeat","required":["type"],"properties":{"type":{"const":"heartbeat"}}},{"type":"object","title":"redeemed","required":["type"],"properties":{"type":{"const":"redeemed"}}},{"type":"object","title":"ended","required":["reason","type"],"properties":{"reason":{"$ref":"#/components/schemas/auth.users_exchange_sessions_offer.EndReason"},"type":{"const":"ended"}}}]},"auth.users_invite_v2.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"type":"object","title":"user_not_found","required":["user_not_found"],"properties":{"user_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"invalid_email_format","required":["invalid_email_format"],"properties":{"invalid_email_format":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"organization_not_found","required":["organization_not_found"],"properties":{"organization_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"no_email_requires_activatable_user"},{"const":"forbidden"}]},"auth.users_invite_v2.GroupInviteItem":{"type":"object","title":"auth.users_invite_v2.GroupInviteItem","required":["group_id","is_admin"],"properties":{"group_id":{"description":"Group id.","$ref":"#/components/schemas/uuid.Uuid"},"is_admin":{"description":"Flag whether the user is admin for the group or not.","$ref":"#/components/schemas/bool"}}},"auth.users_invite_v2.Request":{"type":"object","title":"auth.users_invite_v2.Request","required":["groups","identity"],"properties":{"email_behaviour":{"description":"Controls how the invitation email is handled.\n\n`immediate_email` (default):\n- Standard invitation flow: sends an invitation email with a confirmation\nlink. A brand-new invitee is created as a shell account and the email\ncarries a set-password-and-join link.\n\n`no_email`:\n- Silently attaches the user to the organization with no email and no\nconfirmation token. Only valid for a user who can already authenticate\n(existing password, or an SSO-required org); otherwise it returns\n`no_email_requires_activatable_user`. To provision a usable account\nwithout email, use `users.invite-v3` with `organization_invite_as_staff`\nand a password.\n\nAuthorization rule:\n- `partly_staff` users may set this field to `immediate_email` or `no_email`.\n- Non-`partly_staff` users must use `immediate_email`; `no_email` returns\n`forbidden`.","$ref":"#/components/schemas/auth.UsersInviteV2EmailBehaviour"},"groups":{"description":"The list of groups where the user should be added (groups should be related to the current organization).","type":"array","items":{"$ref":"#/components/schemas/auth.users_invite_v2.GroupInviteItem"}},"identity":{"description":"Identity of the user who should be invited to the current organization.","$ref":"#/components/schemas/auth.UserIdentity"}}},"auth.users_invite_v2.Response":{"type":"object","title":"auth.users_invite_v2.Response","required":["user_id"],"properties":{"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.users_invite_v3.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"organization_not_found","required":["organization_not_found"],"properties":{"organization_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"user_already_exists"},{"const":"weak_password"},{"const":"sso_organization_requires_email"},{"const":"invite_requires_activatable_user"},{"const":"no_scopes"},{"type":"object","title":"not_authorized_for_scope","required":["not_authorized_for_scope"],"properties":{"not_authorized_for_scope":{"$ref":"#/components/schemas/auth.StaffScope"}}},{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"$ref":"#/components/schemas/u64"}}}]},"auth.users_invite_v3.GroupInvite":{"type":"object","title":"auth.users_invite_v3.GroupInvite","required":["group_id","is_admin"],"properties":{"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_admin":{"$ref":"#/components/schemas/bool"}}},"auth.users_invite_v3.InitMode":{"oneOf":[{"type":"object","title":"password","required":["password"],"properties":{"password":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"organization_invite_email","required":["organization_invite_email"],"properties":{"organization_invite_email":{"type":"object","title":"organization_invite_email","required":["groups","organization_id"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.users_invite_v3.GroupInvite"}},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"invite_staff","required":["invite_staff"],"properties":{"invite_staff":{"type":"object","title":"invite_staff","required":["permissions"],"properties":{"permissions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.StaffScope"}}}}}},{"type":"object","title":"organization_invite_as_staff","required":["organization_invite_as_staff"],"properties":{"organization_invite_as_staff":{"type":"object","title":"organization_invite_as_staff","required":["groups","organization_id","password","send_email"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/auth.users_invite_v3.GroupInvite"}},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"password":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"send_email":{"$ref":"#/components/schemas/bool"}}}}}]},"auth.users_invite_v3.Request":{"type":"object","title":"auth.users_invite_v3.Request","required":["email","init_mode"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"},"init_mode":{"$ref":"#/components/schemas/auth.users_invite_v3.InitMode"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"auth.users_invite_v3.Response":{"type":"object","title":"auth.users_invite_v3.Response","required":["user_id"],"properties":{"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth.users_remove.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"type":"object","title":"user_not_found","required":["user_not_found"],"properties":{"user_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"user_is_last_admin"},{"const":"forbidden"}]},"auth.users_remove.Request":{"type":"object","title":"auth.users_remove.Request","properties":{"id":{"description":"The user ID of the person who should be removed.\nIf not provided, the subject's user ID will be used.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"auth.users_signin_v2.Error":{"oneOf":[{"const":"invalid_email_or_password"},{"const":"invalid_auth_code"},{"const":"sso_login_required"},{"const":"inactive"},{"type":"object","title":"too_many_attempts","required":["too_many_attempts"],"properties":{"too_many_attempts":{"$ref":"#/components/schemas/u64"}}},{"const":"forbidden","description":"The caller may not hold a token for the scope they asked for — they are not\na user, or they do not belong to the organization."},{"const":"business_not_signable","description":"The organization is fine; that business is not one it can be signed in to.\nA repairer site is the usual case — it has no verify issuer of its own."},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}}]},"auth.users_signin_v2.Request":{"oneOf":[{"description":"Email and password, as `users.signin`'s `new` variant.","type":"object","title":"New","required":["email","password"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"},"password":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Completes a federated flow, as `users.signin`'s `federated_auth_code` variant.","type":"object","title":"FederatedAuthCode","required":["auth_code","pkce_verifier","redirect_url"],"properties":{"auth_code":{"$ref":"#/components/schemas/std.string.String"},"pkce_verifier":{"$ref":"#/components/schemas/std.string.String"},"redirect_url":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Re-scopes an existing session to the named organization, and to the named\nbusiness within it — or, when no business is named, to that organization's\nsingle sign-in-capable business if it has one.","type":"object","title":"Switch","required":["access_token","business_id","organization_id"],"properties":{"access_token":{"$ref":"#/components/schemas/std.string.String"},"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"Refresh","required":["refresh_token"],"properties":{"refresh_token":{"$ref":"#/components/schemas/std.string.String"}}}]},"auth.users_signin_v2.Response":{"type":"object","title":"auth.users_signin_v2.Response","required":["active","selected_business_id","selected_organization_id"],"properties":{"active":{"description":"The pair to make requests with. `Switch` re-mints it from scratch, so it\ncarries exactly the scope `selected_*` reports and nothing from before.","$ref":"#/components/schemas/auth.users_signin_v2.Tokens"},"selected_business_id":{"description":"The business `active` was scoped to.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"selected_organization_id":{"description":"The organization `active` was scoped to.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"auth.users_signin_v2.Tokens":{"type":"object","title":"auth.users_signin_v2.Tokens","required":["access_token","refresh_token"],"properties":{"access_token":{"description":"JWT access token","$ref":"#/components/schemas/std.string.String"},"refresh_token":{"description":"JWT refresh token, if available","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"auth.users_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"type":"object","title":"user_not_found","required":["user_not_found"],"properties":{"user_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"empty_user_name"},{"const":"forbidden"},{"const":"sso_user_cannot_change_password"},{"const":"weak_password"},{"const":"password_with_leading_or_trailing_whitespace"}]},"auth.users_update.Password":{"type":"object","title":"auth.users_update.Password","required":["current_password","new_password"],"properties":{"current_password":{"$ref":"#/components/schemas/std.string.String"},"new_password":{"$ref":"#/components/schemas/std.string.String"}}},"auth.users_update.Request":{"type":"object","title":"auth.users_update.Request","properties":{"mobile_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"password":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/auth.users_update.Password"}]}}},"auth.users_update.Response":{"type":"object","title":"auth.users_update.Response","required":["id","name"],"properties":{"id":{"description":"User id","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"User name","$ref":"#/components/schemas/std.string.String"}}},"auth_pim.SupplierAuthorizationDetails":{"type":"object","title":"auth_pim.SupplierAuthorizationDetails","required":["entity","organization_id","store_id"],"properties":{"entity":{"$ref":"#/components/schemas/auth_pim.SupplierAuthorizationDetailsEntity"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth_pim.SupplierAuthorizationDetailsEntity":{"oneOf":[{"type":"object","title":"user","required":["user"],"properties":{"user":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"integration","required":["integration"],"properties":{"integration":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"auth_pim.SuppliersVerifyRequest":{"type":"object","title":"auth_pim.SuppliersVerifyRequest","required":["integration_id","supplier_id"],"properties":{"integration_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"supplier_id":{"description":"Currently PIM can work within the context of the single supplier business entity","$ref":"#/components/schemas/uuid.Uuid"}}},"auth_repairer.InsurerAuthorizationDetails":{"type":"object","title":"auth_repairer.InsurerAuthorizationDetails","required":["insurer_id","organization_id"],"properties":{"insurer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"auth_repairer.RepairerAuthorizationDetails":{"type":"object","title":"auth_repairer.RepairerAuthorizationDetails","required":["organization_id","repairer_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"repairer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"basket_builder.CombinationOf":{"oneOf":[{"type":"object","title":"one","required":["type"],"properties":{"type":{"const":"one"}}},{"type":"object","title":"two","required":["type"],"properties":{"type":{"const":"two"}}}]},"basket_builder.Completion":{"oneOf":[{"type":"object","title":"any","required":["type"],"properties":{"type":{"const":"any"}}},{"type":"object","title":"all","required":["type"],"properties":{"type":{"const":"all"}}}]},"basket_builder.DeliveryFilter":{"oneOf":[{"type":"object","title":"days","required":["type","value"],"properties":{"type":{"const":"days"},"value":{"oneOf":[{"type":"object","title":"min<u32>","required":["type","value"],"properties":{"type":{"const":"min"},"value":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"max<u32>","required":["type","value"],"properties":{"type":{"const":"max"},"value":{"$ref":"#/components/schemas/u32"}}}]}}},{"type":"object","title":"confirmation","required":["type","value"],"properties":{"type":{"const":"confirmation"},"value":{"$ref":"#/components/schemas/reflectapi_ex.empty.Empty"}}}]},"basket_builder.Filter":{"oneOf":[{"type":"object","title":"and","required":["type","value"],"properties":{"type":{"const":"and"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/basket_builder.Filter"}}}},{"type":"object","title":"or","required":["type","value"],"properties":{"type":{"const":"or"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/basket_builder.Filter"}}}},{"type":"object","title":"not","required":["type","value"],"properties":{"type":{"const":"not"},"value":{"$ref":"#/components/schemas/basket_builder.Filter"}}},{"type":"object","title":"supplier","required":["type","value"],"properties":{"type":{"const":"supplier"},"value":{"$ref":"#/components/schemas/basket_builder.SupplierFilter"}}},{"type":"object","title":"delivery","required":["type","value"],"properties":{"type":{"const":"delivery"},"value":{"$ref":"#/components/schemas/basket_builder.DeliveryFilter"}}},{"type":"object","title":"supply_type","required":["type","value"],"properties":{"type":{"const":"supply_type"},"value":{"$ref":"#/components/schemas/business_rules.SupplyType"}}},{"type":"object","title":"preferred_suppliers","required":["type","value"],"properties":{"type":{"const":"preferred_suppliers"},"value":{"$ref":"#/components/schemas/basket_builder.PreferenceRanks"}}}]},"basket_builder.Partition":{"oneOf":[{"description":"pool all offers together into a single basket.","type":"object","title":"all","required":["completion","type"],"properties":{"completion":{"$ref":"#/components/schemas/basket_builder.Completion"},"type":{"const":"all"}}},{"description":"generate one basket per combination of n suppliers.","type":"object","title":"supplier","required":["combination_of_n","completion","type"],"properties":{"combination_of_n":{"$ref":"#/components/schemas/basket_builder.CombinationOf"},"completion":{"$ref":"#/components/schemas/basket_builder.Completion"},"reduce":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/basket_builder.Reduce"}]},"type":{"const":"supplier"}}},{"description":"generate one basket per supply type.","type":"object","title":"supply_type","required":["completion","type"],"properties":{"completion":{"$ref":"#/components/schemas/basket_builder.Completion"},"reduce":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/basket_builder.Reduce"}]},"type":{"const":"supply_type"}}}]},"basket_builder.PreferenceRanks":{"oneOf":[{"type":"object","title":"all","required":["type","value"],"properties":{"type":{"const":"all"},"value":{"$ref":"#/components/schemas/reflectapi_ex.empty.Empty"}}},{"type":"object","title":"exact","required":["type","value"],"properties":{"type":{"const":"exact"},"value":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"range","required":["type","value"],"properties":{"type":{"const":"range"},"value":{"description":"half-open range; missing bound = unbounded on that side.","type":"object","title":"basket_builder.Range<u32>","properties":{"from":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"to":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}}}}]},"basket_builder.Rank":{"oneOf":[{"type":"object","title":"best","required":["type"],"properties":{"type":{"const":"best"}}},{"type":"object","title":"general","required":["type"],"properties":{"type":{"const":"general"}}}]},"basket_builder.Reduce":{"oneOf":[{"description":"reduce to the single best basket using this algorithm.","type":"object","title":"best","required":["algorithm","type"],"properties":{"algorithm":{"$ref":"#/components/schemas/basket_builder_basket.Algorithm"},"type":{"const":"best"}}}]},"basket_builder.SupplierFilter":{"oneOf":[{"type":"object","title":"business","required":["type","value"],"properties":{"type":{"const":"business"},"value":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"basket_builder_basket.Algorithm":{"oneOf":[{"description":"baskets are compared against each other using each criterion in priority order, and the\nbasket that wins the most important criterion is selected. if there is a tie, the next\ncriterion is used as a tiebreaker, and so on.","type":"object","title":"lexicographic","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/basket_builder_basket.Criterion"}},"type":{"const":"lexicographic"}}}]},"basket_builder_basket.Criterion":{"oneOf":[{"type":"object","title":"metric","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_basket.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_basket.Metric"}}},{"type":"object","title":"desc<basket_builder_basket.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_basket.Metric"}}}]}}}]},"basket_builder_basket.Metric":{"oneOf":[{"const":"price"},{"const":"delivery_time"},{"const":"margin"},{"const":"icop"}]},"basket_builder_offer.Metric":{"oneOf":[{"const":"price"},{"const":"delivery_time"},{"const":"margin"},{"const":"icop"}]},"basket_builder_offer.Preference":{"oneOf":[{"type":"object","title":"and","required":["type","value"],"properties":{"type":{"const":"and"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}},{"type":"object","title":"or","required":["type","value"],"properties":{"type":{"const":"or"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}},{"type":"object","title":"supplier","required":["type","value"],"properties":{"type":{"const":"supplier"},"value":{"$ref":"#/components/schemas/basket_builder_offer.SupplierPreference"}}},{"type":"object","title":"supply_type","required":["type","value"],"properties":{"type":{"const":"supply_type"},"value":{"$ref":"#/components/schemas/business_rules.SupplyType"}}},{"type":"object","title":"gapc_brand","required":["type","value"],"properties":{"type":{"const":"gapc_brand"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"preferred_suppliers","required":["type","value"],"properties":{"type":{"const":"preferred_suppliers"},"value":{"$ref":"#/components/schemas/basket_builder.PreferenceRanks"}}}]},"basket_builder_offer.SupplierPreference":{"oneOf":[{"type":"object","title":"business","required":["type","value"],"properties":{"type":{"const":"business"},"value":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"billing.AttachmentDetail":{"description":"A committed attachment, returned by `insert`, `list` and `url`.","type":"object","title":"billing.AttachmentDetail","required":["created_at","filename","id","is_internal","mime_type","position","size_bytes","storage_key"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"filename":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_internal":{"$ref":"#/components/schemas/bool"},"mime_type":{"$ref":"#/components/schemas/std.string.String"},"position":{"$ref":"#/components/schemas/i32"},"size_bytes":{"$ref":"#/components/schemas/i64"},"storage_key":{"$ref":"#/components/schemas/std.string.String"}}},"billing.AttachmentInsertFile":{"description":"File metadata to commit after the bytes have been uploaded.","type":"object","title":"billing.AttachmentInsertFile","required":["filename","is_internal","mime_type","size_bytes","storage_key"],"properties":{"filename":{"description":"Display filename shown to users.","$ref":"#/components/schemas/std.string.String"},"is_internal":{"description":"When true, the attachment is internal to the issuer and is not shared\nwith the customer. Required — the caller chooses the visibility\nexplicitly, so a private document is never silently shared by omission.","$ref":"#/components/schemas/bool"},"mime_type":{"description":"MIME type of the uploaded file.","$ref":"#/components/schemas/std.string.String"},"size_bytes":{"description":"File size in bytes. Must be non-negative.","$ref":"#/components/schemas/i64"},"storage_key":{"description":"Opaque object-storage key returned by the matching `prepare`.","$ref":"#/components/schemas/std.string.String"}}},"billing.AttachmentPrepareFile":{"description":"Client-provided display and validation metadata for one attachment upload.","type":"object","title":"billing.AttachmentPrepareFile","required":["filename","mime_type","size_bytes"],"properties":{"filename":{"description":"Original filename to display to users.","$ref":"#/components/schemas/std.string.String"},"mime_type":{"description":"MIME type of the file being uploaded.","$ref":"#/components/schemas/std.string.String"},"size_bytes":{"description":"File size in bytes. Must be non-negative.","$ref":"#/components/schemas/i64"}}},"billing.AttachmentPrepareUpload":{"description":"A short-lived private upload slot for one attachment.","type":"object","title":"billing.AttachmentPrepareUpload","required":["expires_at","storage_key","upload_url"],"properties":{"expires_at":{"description":"Time when `upload_url` expires.","type":"string","format":"date-time"},"storage_key":{"description":"Opaque object-storage key to pass into the matching `insert` after upload.","$ref":"#/components/schemas/std.string.String"},"upload_url":{"description":"Pre-signed URL for uploading the file bytes with HTTP PUT.","$ref":"#/components/schemas/std.string.String"}}},"billing.AttachmentUrlResponse":{"description":"A short-lived presigned GET URL for downloading one attachment.","type":"object","title":"billing.AttachmentUrlResponse","required":["expires_at","filename","mime_type","size_bytes","url"],"properties":{"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"filename":{"$ref":"#/components/schemas/std.string.String"},"mime_type":{"$ref":"#/components/schemas/std.string.String"},"size_bytes":{"$ref":"#/components/schemas/i64"},"url":{"$ref":"#/components/schemas/std.string.String"}}},"billing.AttachmentsPrepareResponse":{"description":"Prepared private upload slots, in the same order as the requested files.","type":"object","title":"billing.AttachmentsPrepareResponse","required":["uploads"],"properties":{"uploads":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentPrepareUpload"}}}},"billing.BankTransferDetails":{"description":"Bank transfer details for invoice payment","type":"object","title":"billing.BankTransferDetails","required":["account_holder","account_number","bank_name","reference"],"properties":{"account_holder":{"$ref":"#/components/schemas/std.string.String"},"account_number":{"$ref":"#/components/schemas/std.string.String"},"bank_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"bank_name":{"$ref":"#/components/schemas/std.string.String"},"iban":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reference":{"$ref":"#/components/schemas/std.string.String"},"sort_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"swift_bic":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.BaselineDetail":{"type":"object","title":"billing.BaselineDetail","required":["actor","amount","created_at","currency_id","effective_from","effective_to","id","reason","relationship_id","rule_snapshot","scope","scope_hash","source"],"properties":{"actor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"amount":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"effective_to":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"relationship_id":{"$ref":"#/components/schemas/uuid.Uuid"},"rule_snapshot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"scope":{"$ref":"#/components/schemas/serde_json.Value"},"scope_hash":{"$ref":"#/components/schemas/std.string.String"},"source":{"$ref":"#/components/schemas/std.string.String"}}},"billing.BaselineWriteError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"type":"object","title":"invalid_input","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.BaselineWriteRequest":{"type":"object","title":"billing.BaselineWriteRequest","required":["amount","baseline_scope","currency_id","current_revision_id","effective_from","reason","relationship_id","scope"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"baseline_scope":{"$ref":"#/components/schemas/billing_core.pricing.policy.BaselineScope"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"current_revision_id":{"description":"Absent creates an initial lineage; present supersedes exactly this open revision.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"reason":{"$ref":"#/components/schemas/std.string.String"},"relationship_id":{"$ref":"#/components/schemas/uuid.Uuid"},"scope":{"$ref":"#/components/schemas/billing.ConfigurationScope"}}},"billing.BilledEventAmount":{"type":"object","title":"billing.BilledEventAmount","required":["event_type","quantity"],"properties":{"event_type":{"$ref":"#/components/schemas/billing.BilledUsageEventType"},"quantity":{"$ref":"#/components/schemas/std.string.String"}}},"billing.BilledMeterTotal":{"type":"object","title":"billing.BilledMeterTotal","required":["basis","event_amounts","fact_count","net_quantity","reconciliation","usage_meter_id"],"properties":{"basis":{"$ref":"#/components/schemas/billing.InvoiceLineBasis"},"category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"event_amounts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.BilledEventAmount"}},"fact_count":{"$ref":"#/components/schemas/u64"},"invoice_item_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"net_quantity":{"$ref":"#/components/schemas/std.string.String"},"price_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"reconciliation":{"description":"Compares the line's records with a fresh selection. Information only: rows and totals\nalways follow `basis`.","$ref":"#/components/schemas/billing.InvoiceLineReconciliation"},"unit":{"description":"The meter's unit, a currency code for value meters; absent for counts.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"usage_meter_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.BilledOrder":{"type":"object","title":"billing.BilledOrder","required":["meters","source_resolution"],"properties":{"buyer_business":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.BilledOrderParty"}]},"buyer_contact":{"description":"The buyer user who first moved the order's status, else the user who started it.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.BilledOrderParty"}]},"buyer_organization":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.BilledOrderParty"}]},"created_at":{"description":"When the procurement, or the legacy order, was created.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"currency_code":{"description":"ISO code, from the procurement, else from the facts.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"first_confirmed_at":{"description":"From the earliest `order_confirmed` fact, else the confirmation time recorded on the\norder's cancellation or return facts.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"item_summary":{"description":"The procurement's current top-level offered items, the item set the procurement billing\nbatch values (a bundle counts once); a legacy order's current items. Later edits can\ndiffer from what was billed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.BilledOrderItemSummary"}]},"items":{"description":"The procurement's current top-level offered items, or the legacy order's items.","type":"array","items":{"$ref":"#/components/schemas/billing.BilledOrderItem"}},"job_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"legacy_order_id":{"description":"The legacy supplier order id the facts carry in `metadata.order_id`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"meters":{"description":"Signed billed quantities per meter. A meter absent here billed nothing for this order.","type":"array","items":{"$ref":"#/components/schemas/billing.BilledOrderMeterAmounts"}},"portal_url":{"description":"The OMS link, present only when a procurement resolved.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"procurement_id":{"description":"Absent when no procurement resolves; the row then comes from the legacy supplier order\n(`source_resolution = legacy_order`) or, failing that, from the facts alone.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"reference":{"description":"The procurement's shared buyer/supplier reference (the Partly order number); a legacy\norder's `external_id`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"source_id":{"description":"The facts' `source_id`, or `procurement_id(order_id)` when the column is empty.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"source_resolution":{"$ref":"#/components/schemas/billing.BilledOrderSourceResolution"},"status":{"description":"The procurement's current status; a legacy order's status mapped as the upgrade maps it.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.BilledOrderStatus"}]},"supplier_business":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.BilledOrderParty"}]},"supplier_reference":{"description":"The supplier's own reference, entered when sending the offer (OMS \"Supplier reference\");\nlegacy orders carried it as the offer or order reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_description":{"description":"The variant description as the buyer's system named it.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_make":{"description":"The UVDB make's name.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_model":{"description":"The UVDB model's name.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_plate_number":{"description":"The vehicle fields resolve, each on its own, from the procurement's first\n`procurement_inserted` snapshot, else its current row, else the job's vehicles (a legacy\norder: its `vehicle_context`, else the job's vehicles). A UVDB make, model or year resolves\nat a level only when that level holds exactly one distinct value.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_vin":{"description":"VIN or chassis number.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_year":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"work_provider":{"description":"The job's work provider as the repairer named it, else the work provider organization.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.BilledOrderItem":{"type":"object","title":"billing.BilledOrderItem","required":["description","item_id","item_type"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"is_oem":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"item_id":{"description":"The offered item id, or the legacy order item's identity.","$ref":"#/components/schemas/std.string.String"},"item_type":{"$ref":"#/components/schemas/std.string.String"},"line_total":{"description":"Trade price × quantity (a bundle without a quantity counts once).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"sku":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.BilledOrderItemSummary":{"type":"object","title":"billing.BilledOrderItemSummary","required":["item_count"],"properties":{"item_count":{"$ref":"#/components/schemas/i64"},"items_total":{"description":"Trade price × quantity over the current top-level items, excluding shipping.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_total":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.BilledOrderMeterAmounts":{"type":"object","title":"billing.BilledOrderMeterAmounts","required":["event_amounts","net_quantity","usage_meter_id"],"properties":{"category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"event_amounts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.BilledEventAmount"}},"net_quantity":{"$ref":"#/components/schemas/std.string.String"},"usage_meter_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.BilledOrderParty":{"type":"object","title":"billing.BilledOrderParty","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.BilledOrderSourceResolution":{"oneOf":[{"const":"procurement_id","description":"The facts' `source_id` is the procurement id."},{"const":"translated_to_order","description":"The procurement's `translated_to_order` is the facts' legacy order id."},{"const":"translated_from_order","description":"The procurement's `translated_from_order` is the facts' legacy order id."},{"const":"derived_legacy_order_id","description":"The facts' legacy order id is derived from the procurement id: a native procurement\nwith no legacy twin."},{"const":"legacy_order","description":"No procurement matches; the facts' legacy order id is a `partly.supplier_orders` row of\nthe invoiced customer's stores, read until that table is retired."},{"const":"unresolved","description":"The facts carry an order identity but neither a procurement nor a legacy order of the\ninvoiced customer matches it."},{"const":"no_source_identity","description":"The facts carry neither a legacy order id nor a source id."}]},"billing.BilledOrderStatus":{"oneOf":[{"const":"offers_requested"},{"const":"offers_sent"},{"const":"order_requested"},{"const":"order_confirmed"},{"const":"off_network"},{"const":"closed"}]},"billing.BilledUsageEventType":{"oneOf":[{"const":"order_confirmed"},{"const":"order_cancelled"},{"const":"return_accepted"},{"const":"return_rejected"},{"const":"other"}]},"billing.BillingScheme":{"oneOf":[{"const":"flat_rate"},{"const":"per_unit"},{"const":"tiered"}]},"billing.ClassificationDetail":{"type":"object","title":"billing.ClassificationDetail","required":["actor","class","created_at","effective_from","effective_to","id","reason","relationship_id","rule_snapshot","source","vehicle_make_id"],"properties":{"actor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"class":{"$ref":"#/components/schemas/billing_core.pricing.policy.RelationshipClass"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"effective_to":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"relationship_id":{"$ref":"#/components/schemas/uuid.Uuid"},"rule_snapshot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"source":{"$ref":"#/components/schemas/std.string.String"},"vehicle_make_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.CollectionAttemptStatus":{"oneOf":[{"const":"queued"},{"const":"submitting"},{"const":"processing"},{"const":"requires_customer_action"},{"const":"cancellation_requested"},{"const":"reconciliation_required"},{"const":"succeeded"},{"const":"failed"},{"const":"cancelled"}]},"billing.CollectionMode":{"oneOf":[{"const":"manual"},{"const":"automatic"}]},"billing.CollectionProfileSummaryItem":{"type":"object","title":"billing.CollectionProfileSummaryItem","required":["currency_scope","effective_from","id","provider"],"properties":{"currency_scope":{"description":"Either \"*\" (all currencies) or an ISO-4217 uppercase code.","$ref":"#/components/schemas/std.string.String"},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"provider":{"$ref":"#/components/schemas/billing.PaymentSetupProvider"}}},"billing.ConfigurationDetail":{"oneOf":[{"type":"object","title":"missing_configuration","required":["details","error_type"],"properties":{"details":{"type":"object","title":"missing_configuration","required":["setting"],"properties":{"setting":{"$ref":"#/components/schemas/billing.ConfigurationSetting"}}},"error_type":{"const":"missing_configuration"}}},{"type":"object","title":"invalid_configuration","required":["details","error_type"],"properties":{"details":{"type":"object","title":"invalid_configuration","required":["reason","setting"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"},"setting":{"$ref":"#/components/schemas/billing.ConfigurationSetting"}}},"error_type":{"const":"invalid_configuration"}}},{"type":"object","title":"price_configuration","required":["details","error_type"],"properties":{"details":{"type":"object","title":"price_configuration","required":["issue","price_id"],"properties":{"issue":{"$ref":"#/components/schemas/std.string.String"},"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_configuration"}}},{"type":"object","title":"provider_configuration","required":["details","error_type"],"properties":{"details":{"type":"object","title":"provider_configuration","required":["issue","provider"],"properties":{"issue":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"provider_configuration"}}},{"type":"object","title":"generic","required":["details","error_type"],"properties":{"details":{"type":"object","title":"generic","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"generic"}}},{"type":"object","title":"invalid_tier_order","required":["details","error_type"],"properties":{"details":{"type":"object","title":"invalid_tier_order","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_tier_order"}}},{"type":"object","title":"invalid_block_size","required":["details","error_type"],"properties":{"details":{"type":"object","title":"invalid_block_size","required":["size"],"properties":{"size":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_block_size"}}},{"type":"object","title":"missing_unit_amount","required":["details","error_type"],"properties":{"details":{"type":"object","title":"missing_unit_amount","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"missing_unit_amount"}}},{"type":"object","title":"missing_unit_block_size","required":["details","error_type"],"properties":{"details":{"type":"object","title":"missing_unit_block_size","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"missing_unit_block_size"}}},{"type":"object","title":"invalid_tier_data","required":["details","error_type"],"properties":{"details":{"type":"object","title":"invalid_tier_data","required":["message","price_id"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"},"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_tier_data"}}}]},"billing.ConfigurationHistoryError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"type":"object","title":"invalid_input","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.ConfigurationHistoryRequest":{"type":"object","title":"billing.ConfigurationHistoryRequest","required":["limit","offset","scope","target"],"properties":{"limit":{"$ref":"#/components/schemas/i64"},"offset":{"$ref":"#/components/schemas/i64"},"scope":{"$ref":"#/components/schemas/billing.ConfigurationScope"},"target":{"$ref":"#/components/schemas/billing.ConfigurationHistoryTarget"}}},"billing.ConfigurationHistoryResponse":{"oneOf":[{"type":"object","title":"relationship","required":["baselines","classifications","kind"],"properties":{"baselines":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.BaselineDetail"}},"classifications":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.ClassificationDetail"}},"kind":{"const":"relationship"}}},{"type":"object","title":"pricing_policy","required":["kind","revisions"],"properties":{"kind":{"const":"pricing_policy"},"revisions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.PricingRevisionDetail"}}}}]},"billing.ConfigurationHistoryTarget":{"oneOf":[{"type":"object","title":"relationship","required":["kind","relationship_id"],"properties":{"kind":{"const":"relationship"},"relationship_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"pricing_policy","required":["kind","subscription_item_id"],"properties":{"kind":{"const":"pricing_policy"},"subscription_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"billing.ConfigurationPreviewContribution":{"type":"object","title":"billing.ConfigurationPreviewContribution","required":["amount","baseline_revision_id","classification_revision_id","currency_id","effective_rate_bps","policy_revision_id","primitive_id","quantity","relationship_id","revenue_category","sample_id"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"baseline_revision_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"classification_revision_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"effective_rate_bps":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"policy_revision_id":{"$ref":"#/components/schemas/uuid.Uuid"},"primitive_id":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"$ref":"#/components/schemas/std.string.String"},"relationship_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"revenue_category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.pricing.policy.RevenueCategory"}]},"sample_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"billing.ConfigurationPreviewError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"type":"object","title":"invalid_input","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.ConfigurationPreviewRequest":{"type":"object","title":"billing.ConfigurationPreviewRequest","required":["samples","scope","subscription_item_id","subscription_period_id"],"properties":{"samples":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.ConfigurationPreviewSample"}},"scope":{"$ref":"#/components/schemas/billing.ConfigurationScope"},"subscription_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"subscription_period_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.ConfigurationPreviewResponse":{"type":"object","title":"billing.ConfigurationPreviewResponse","required":["contributions","hypothetical"],"properties":{"contributions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.ConfigurationPreviewContribution"}},"hypothetical":{"description":"Always hypothetical: samples are caller input and amounts are before invoice rounding/tax.","$ref":"#/components/schemas/bool"}}},"billing.ConfigurationPreviewSample":{"description":"Hypothetical quantities for a configuration preview, never persisted as usage or invoices.","type":"object","title":"billing.ConfigurationPreviewSample","required":["currency_id","network_id","occurred_at","quantity","relationship_id","revenue_category","sample_id","supply_class","vehicle_make_id"],"properties":{"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"network_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"occurred_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"quantity":{"$ref":"#/components/schemas/std.string.String"},"relationship_id":{"$ref":"#/components/schemas/uuid.Uuid"},"revenue_category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.pricing.policy.RevenueCategory"}]},"sample_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supply_class":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.facts.SupplyClass"}]},"vehicle_make_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.ConfigurationResolveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"type":"object","title":"invalid_input","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.ConfigurationResolveRequest":{"type":"object","title":"billing.ConfigurationResolveRequest","required":["occurred_at","relationship_id","scope","subscription_item_id","subscription_period_id","vehicle_make_id"],"properties":{"occurred_at":{"description":"Classification resolves at event time; baseline and pricing resolve at period start.","type":"string","format":"date-time"},"relationship_id":{"$ref":"#/components/schemas/uuid.Uuid"},"scope":{"$ref":"#/components/schemas/billing.ConfigurationScope"},"subscription_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"subscription_period_id":{"$ref":"#/components/schemas/uuid.Uuid"},"vehicle_make_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.ConfigurationResolveResponse":{"type":"object","title":"billing.ConfigurationResolveResponse","required":["baselines","classification","pricing"],"properties":{"baselines":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.BaselineDetail"}},"classification":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ClassificationDetail"}]},"pricing":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PricingRevisionDetail"}]}}},"billing.ConfigurationScope":{"type":"object","title":"billing.ConfigurationScope","required":["customer_id","subscription_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.ConfigurationSetting":{"oneOf":[{"const":"stripe_api_key"},{"const":"xero_client_id"},{"const":"default_currency"},{"const":"webhook_endpoint"},{"const":"price_configuration"},{"const":"provider_configuration"}]},"billing.CreditNoteMetadata":{"description":"Credit note system metadata for invoices that are credit notes","type":"object","title":"billing.CreditNoteMetadata","required":["credit_note_request_id","number","original_invoice_id"],"properties":{"credit_note_request_id":{"description":"The ID of the credit note request that created this invoice","$ref":"#/components/schemas/uuid.Uuid"},"number":{"description":"Reference number for the credit note (e.g., \"CN-{request_id}\")","$ref":"#/components/schemas/std.string.String"},"original_invoice_id":{"description":"The ID of the original invoice this credit note is for","$ref":"#/components/schemas/uuid.Uuid"}}},"billing.CreditNoteRequestCreateRequest":{"type":"object","title":"billing.CreditNoteRequestCreateRequest","required":["invoice_id","reason_code","requested_amount"],"properties":{"attachments":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"currency_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"reason_code":{"$ref":"#/components/schemas/std.string.String"},"requested_amount":{"$ref":"#/components/schemas/std.string.String"},"source_identifiers":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CreditNoteRequestStatus"}]}}},"billing.CreditNoteRequestDetail":{"type":"object","title":"billing.CreditNoteRequestDetail","required":["attachments","created_at","currency_id","customer_id","id","invoice_id","metadata","reason_code","requested_amount","requester_business_id","requester_user_id","source_identifiers","status","updated_at"],"properties":{"attachments":{"$ref":"#/components/schemas/serde_json.Value"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"credit_note_invoice_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"reason_code":{"$ref":"#/components/schemas/std.string.String"},"requested_amount":{"$ref":"#/components/schemas/std.string.String"},"requester_business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"requester_user_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"resolution_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"resolved_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"resolved_by_user_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"source_identifiers":{"$ref":"#/components/schemas/serde_json.Value"},"status":{"$ref":"#/components/schemas/billing.CreditNoteRequestStatus"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.CreditNoteRequestInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"invalid_requested_amount","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_requested_amount","required":["amount","reason"],"properties":{"amount":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_requested_amount"}}},{"type":"object","title":"currency_mismatch","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"currency_mismatch","required":["invoice_currency","requested_currency"],"properties":{"invoice_currency":{"$ref":"#/components/schemas/std.string.String"},"requested_currency":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"currency_mismatch"}}},{"type":"object","title":"requested_amount_exceeds_invoice_total","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"requested_amount_exceeds_invoice_total","required":["invoice_total","requested_amount"],"properties":{"invoice_total":{"$ref":"#/components/schemas/std.string.String"},"requested_amount":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"requested_amount_exceeds_invoice_total"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.CreditNoteRequestListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.CreditNoteRequestListRequest":{"type":"object","title":"billing.CreditNoteRequestListRequest","properties":{"customer_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"invoice_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CreditNoteRequestStatus"}]}}},"billing.CreditNoteRequestStatus":{"oneOf":[{"const":"submitted","description":"Initial status when request is created"},{"const":"in_review","description":"Request is being reviewed"},{"const":"approved","description":"Request has been approved; the credit is pending application to the\ncustomer's next matching subscription invoice."},{"const":"rejected","description":"Request has been rejected"},{"const":"withdrawn","description":"Request has been withdrawn by the requester"}]},"billing.CreditNoteRequestSummary":{"description":"Summary of a credit note request for denormalization on invoices","type":"object","title":"billing.CreditNoteRequestSummary","required":["created_at","id","reason_code","requested_amount","status"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason_code":{"$ref":"#/components/schemas/std.string.String"},"requested_amount":{"$ref":"#/components/schemas/std.string.String"},"status":{"$ref":"#/components/schemas/std.string.String"}}},"billing.CreditNoteRequestUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"credit_note_request_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"credit_note_request_not_found","required":["credit_note_request_id"],"properties":{"credit_note_request_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"credit_note_request_not_found"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"no_fields_to_update","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"no_fields_to_update","properties":{}},"error_type":{"const":"no_fields_to_update"}}},{"type":"object","title":"invalid_status_transition","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_status_transition","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_status_transition"}}},{"type":"object","title":"already_approved","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"already_approved","required":["credit_note_request_id"],"properties":{"credit_note_request_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"already_approved"}}},{"type":"object","title":"credit_note_invoice_already_exists","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"credit_note_invoice_already_exists","required":["credit_note_invoice_id","credit_note_request_id"],"properties":{"credit_note_invoice_id":{"$ref":"#/components/schemas/std.string.String"},"credit_note_request_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"credit_note_invoice_already_exists"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.CreditNoteRequestUpdateRequest":{"type":"object","title":"billing.CreditNoteRequestUpdateRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"resolution_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CreditNoteRequestStatus"}]}}},"billing.CurrencyExchangeRateListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.CurrencyExchangeRateListItem":{"description":"An exchange rate in the list response.","type":"object","title":"billing.CurrencyExchangeRateListItem","required":["base_currency_code","rate","target_currency_code","updated_at"],"properties":{"base_currency_code":{"$ref":"#/components/schemas/iso_currency.CurrencyCode"},"rate":{"description":"Decimal rate as string for precision (e.g., \"0.57\" means 1 base = 0.57 target)","$ref":"#/components/schemas/std.string.String"},"target_currency_code":{"$ref":"#/components/schemas/iso_currency.CurrencyCode"},"updated_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"billing.CurrencyExchangeRateListRequest":{"description":"Request for listing exchange rates for a target currency.","type":"object","title":"billing.CurrencyExchangeRateListRequest","required":["target_currency_code"],"properties":{"target_currency_code":{"description":"Target currency code (e.g., \"USD\"). Rates returned as \"1 base = X target\".","$ref":"#/components/schemas/iso_currency.CurrencyCode"}}},"billing.CurrencyListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.CurrencyListItem":{"description":"A currency in the list response.","type":"object","title":"billing.CurrencyListItem","required":["currency_code","currency_name","currency_symbol","id"],"properties":{"currency_code":{"$ref":"#/components/schemas/std.string.String"},"currency_name":{"$ref":"#/components/schemas/std.string.String"},"currency_symbol":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.CurrencyListRequest":{"description":"Request for listing currencies (no filters needed).","type":"object","title":"billing.CurrencyListRequest","properties":{}},"billing.CurrencyStatement":{"description":"The statement ledger for one currency.\n\nAll amounts are tax-inclusive gross in the currency identified by\n`currency_id` (resolve display details via `billing.currencies.list`).\n`entries` is a running ledger:\neach entry's `balance` is the cumulative balance after applying it, starting\nfrom `opening_balance`. The invariant\n`closing_balance == opening_balance + invoiced_total + payments_and_credits_total`\nholds, and `aging.total_outstanding` equals the sum of the aging buckets.","type":"object","title":"billing.CurrencyStatement","required":["aging","closing_balance","currency_id","invoiced_total","opening_balance","payments_and_credits_total"],"properties":{"aging":{"description":"Aging of the outstanding open balance as-at `as_at`.","$ref":"#/components/schemas/billing.StatementAging"},"closing_balance":{"description":"Balance owed at `as_at`.","$ref":"#/components/schemas/std.string.String"},"currency_id":{"description":"The currency all amounts in this statement are denominated in.","$ref":"#/components/schemas/uuid.Uuid"},"entries":{"description":"The dated activity ledger for the period, oldest first.","type":"array","items":{"$ref":"#/components/schemas/billing.StatementEntry"}},"invoiced_total":{"description":"Sum of positive (invoicing) amounts within the period.","$ref":"#/components/schemas/std.string.String"},"opening_balance":{"description":"Balance carried in from all activity strictly before `period_start`.","$ref":"#/components/schemas/std.string.String"},"payments_and_credits_total":{"description":"Sum of non-positive (payment / credit / void / write-off) amounts within\nthe period. Always `<= 0`.","$ref":"#/components/schemas/std.string.String"}}},"billing.CustomerAttachmentRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"attachment_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"attachment_not_found","required":["attachment_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"attachment_not_found"}}}]},"billing.CustomerAttachmentRemoveRequest":{"type":"object","title":"billing.CustomerAttachmentRemoveRequest","required":["attachment_id","customer_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.CustomerAttachmentUrlError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"attachment_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"attachment_not_found","required":["attachment_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"attachment_not_found"}}}]},"billing.CustomerAttachmentUrlRequest":{"type":"object","title":"billing.CustomerAttachmentUrlRequest","required":["attachment_id","customer_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.CustomerAttachmentsInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"invalid_attachment","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_attachment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_attachment"}}}]},"billing.CustomerAttachmentsInsertRequest":{"type":"object","title":"billing.CustomerAttachmentsInsertRequest","required":["customer_id","files"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentInsertFile"}}}},"billing.CustomerAttachmentsInsertResponse":{"type":"object","title":"billing.CustomerAttachmentsInsertResponse","required":["attachments"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentDetail"}}}},"billing.CustomerAttachmentsListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}}]},"billing.CustomerAttachmentsListRequest":{"type":"object","title":"billing.CustomerAttachmentsListRequest","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.CustomerAttachmentsListResponse":{"type":"object","title":"billing.CustomerAttachmentsListResponse","required":["attachments"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentDetail"}}}},"billing.CustomerAttachmentsPrepareError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"too_many_attachments","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"too_many_attachments","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}},"error_type":{"const":"too_many_attachments"}}},{"type":"object","title":"attachment_too_large","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"attachment_too_large","required":["max_bytes"],"properties":{"max_bytes":{"$ref":"#/components/schemas/i64"}}},"error_type":{"const":"attachment_too_large"}}},{"type":"object","title":"mime_not_allowed","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"mime_not_allowed","required":["allowed"],"properties":{"allowed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"error_type":{"const":"mime_not_allowed"}}},{"type":"object","title":"invalid_attachment","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_attachment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_attachment"}}}]},"billing.CustomerAttachmentsPrepareRequest":{"type":"object","title":"billing.CustomerAttachmentsPrepareRequest","required":["customer_id","files"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentPrepareFile"}}}},"billing.CustomerCreateRequest":{"type":"object","title":"billing.CustomerCreateRequest","required":["customer_type","metadata"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"customer_type":{"description":"Customer type: supplier (usage-based) or repairer (subscription-based).","$ref":"#/components/schemas/billing.CustomerType"},"default_tax_rate_id":{"description":"Default tax rate ID for this customer","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"parent_customer_id":{"description":"Parent customer ID for creating downstream/child customers","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"provider":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"tax_jurisdiction":{"description":"Tax jurisdiction for this customer (e.g., \"NZ\", \"UK\", \"ROW\")","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.CustomerDetailItem":{"type":"object","title":"billing.CustomerDetailItem","required":["business_id","business_name","created_at","customer_type","entitlements","external_id","external_ids","id","metadata","organization_id","organization_name","provider","updated_at"],"properties":{"applicable_tax_rate":{"description":"Computed: The actual tax rate that will apply to this customer","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.TaxRateDetailItem"}]},"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"business_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"customer_type":{"description":"Customer type: supplier (usage-based) or repairer (subscription-based).","$ref":"#/components/schemas/billing.CustomerType"},"default_tax_rate_id":{"description":"Default tax rate ID for this customer","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"entitlements":{"description":"Active entitlements for this customer (from subscriptions and manual overrides)","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_ids":{"description":"External identifiers for this customer from different providers (e.g., Stripe, Xero).","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_name":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ProviderType"},"tax_jurisdiction":{"description":"Tax jurisdiction for this customer (e.g., \"NZ\", \"UK\", \"ROW\")","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.CustomerGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}}]},"billing.CustomerGetRequest":{"type":"object","title":"billing.CustomerGetRequest","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.CustomerIdentityItem":{"type":"object","title":"billing.CustomerIdentityItem","required":["business_id","customer_id","organization_id"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"billing.CustomerInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_already_exists","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_already_exists","required":["existing_id"],"properties":{"existing_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"customer_already_exists"}}},{"type":"object","title":"organization_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"organization_not_found","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"organization_not_found"}}},{"type":"object","title":"invalid_request_detail","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_request_detail","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_request_detail"}}},{"type":"object","title":"invalid_invoice_prefix","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/billing.InvoicePrefixIssue"},"error_type":{"const":"invalid_invoice_prefix"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}},{"type":"object","title":"invalid_external_id","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_external_id","required":["external_id","provider","reason"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_external_id"}}},{"type":"object","title":"payment_provider_rejected","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_provider_rejected","required":["code","message","param","provider"],"properties":{"code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"message":{"$ref":"#/components/schemas/std.string.String"},"param":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"payment_provider_rejected"}}},{"type":"object","title":"payment_provider_unavailable","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_provider_unavailable","required":["error_type","message","provider"],"properties":{"error_type":{"$ref":"#/components/schemas/billing.PaymentProviderErrorType"},"message":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"payment_provider_unavailable"}}},{"type":"object","title":"provider_resource_missing","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_resource_missing","required":["external_id","message","provider","resource"],"properties":{"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"message":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"},"resource":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"provider_resource_missing"}}},{"type":"object","title":"provider_idempotency_conflict","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_idempotency_conflict","required":["message","provider"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"provider_idempotency_conflict"}}}]},"billing.CustomerListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}},{"type":"object","title":"invalid_date_range","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_date_range","required":["end_date","reason","start_date"],"properties":{"end_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"reason":{"$ref":"#/components/schemas/std.string.String"},"start_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"error_type":{"const":"invalid_date_range"}}},{"type":"object","title":"invalid_search_query","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_search_query","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_search_query"}}}]},"billing.CustomerListItem":{"type":"object","title":"billing.CustomerListItem","required":["business_id","created_at","customer_type","external_id","external_ids","has_overdue_invoices","id","is_active","metadata","organization_id","updated_at"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"business_name_highlight":{"description":"Highlighted business name showing search match (only present when searching).\nContains HTML with <mark> tags around matched terms.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"currency_id":{"description":"Default currency for this customer (derived from most recent invoice)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"customer_type":{"description":"Customer type: supplier (usage-based) or repairer (subscription-based).","$ref":"#/components/schemas/billing.CustomerType"},"default_tax_rate_id":{"description":"Default tax rate ID for this customer","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_ids":{"description":"External identifiers for this customer from different providers (e.g., Stripe, Xero).","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"has_overdue_invoices":{"description":"Whether this customer has one or more open invoices past the configured overdue grace period.","$ref":"#/components/schemas/bool"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_active":{"description":"Whether this customer is active (has at least one active subscription)","$ref":"#/components/schemas/bool"},"last_invoice_date":{"description":"Date of the most recent invoice for this customer","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_name":{"description":"Organization name for display purposes","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_name_highlight":{"description":"Highlighted organization name showing search match (only present when searching).\nContains HTML with <mark> tags around matched terms.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"subscriptions":{"description":"Active subscriptions for this customer","type":"array","items":{"$ref":"#/components/schemas/billing.CustomerSubscriptionSummary"}},"tax_jurisdiction":{"description":"Tax jurisdiction for this customer (e.g., \"NZ\", \"UK\", \"ROW\")","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.CustomerListRequest":{"description":"Request to retrieve list of Billing Customers.\n","type":"object","title":"billing.CustomerListRequest","required":["pagination"],"properties":{"created_after":{"description":"Retrieve customers created after this date.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"created_before":{"description":"Retrieve customers created before this date.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"customer_type":{"description":"Filter customers by type (supplier or repairer).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CustomerType"}]},"has_overdue_invoices":{"description":"Filter customers by whether they have open invoices past the configured overdue grace period.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"organization_id":{"description":"Retrieve customers that are part of a particular organization","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"search":{"description":"Full-text search query for customer name, organization name, or business name.\nSupports PostgreSQL websearch syntax: AND, OR, NOT operators, and \"quoted phrases\".\nResults are ranked by relevance.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.CustomerRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"customer_in_use","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_in_use","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_in_use"}}}]},"billing.CustomerRemoveRequest":{"type":"object","title":"billing.CustomerRemoveRequest","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.CustomerStatementGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"description":"`period_start` must be strictly before `period_end`. Carries the offending\nvalues so clients can render their own message; there is no display string.","type":"object","title":"invalid_period","required":["error_details","error_type"],"properties":{"error_details":{"description":"`period_start` must be strictly before `period_end`. Carries the offending\nvalues so clients can render their own message; there is no display string.","type":"object","title":"invalid_period","required":["period_end","period_start"],"properties":{"period_end":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"period_start":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"error_type":{"const":"invalid_period"}}}]},"billing.CustomerStatementGetRequest":{"description":"Request a customer account statement for a period.","type":"object","title":"billing.CustomerStatementGetRequest","required":["customer_id","period_end","period_start"],"properties":{"customer_id":{"description":"The customer whose statement to build.","$ref":"#/components/schemas/uuid.Uuid"},"period_end":{"description":"Exclusive end of the statement period (UTC). Activity is reported up to\nbut not including this instant; must be strictly after `period_start`.","type":"string","format":"date-time"},"period_start":{"description":"Inclusive start of the statement period (UTC).","type":"string","format":"date-time"}}},"billing.CustomerStatementResponse":{"description":"A customer account statement for a period, one ledger per currency.\n\nCurrencies never sum, so each currency the customer has non-draft invoices\nin gets its own CurrencyStatement, ordered by most recent activity\nfirst. A customer with no invoices gets an empty `statements` list.","type":"object","title":"billing.CustomerStatementResponse","required":["as_at","customer_id","period_end","period_start"],"properties":{"as_at":{"description":"The instant the statement is drawn up to: `min(period_end, now)`. For the\ncurrent period this truncates activity and aging to \"to date\".","type":"string","format":"date-time"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"period_end":{"description":"Exclusive end of the reported period (echoed from the request).","type":"string","format":"date-time"},"period_start":{"description":"Inclusive start of the reported period (echoed from the request).","type":"string","format":"date-time"},"statements":{"description":"One statement ledger per currency with activity, most recently used\ncurrency first.","type":"array","items":{"$ref":"#/components/schemas/billing.CurrencyStatement"}}}},"billing.CustomerSubscriptionSummary":{"description":"Summary of a customer's subscription for list views","type":"object","title":"billing.CustomerSubscriptionSummary","required":["id","product_ids","status"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"product_ids":{"description":"Product IDs associated with this subscription","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"$ref":"#/components/schemas/billing.SubscriptionStatus"}}},"billing.CustomerType":{"oneOf":[{"const":"supplier","description":"A parts supplier."},{"const":"repairer","description":"An automotive repairer."}]},"billing.CustomerUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"invalid_request_detail","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_request_detail","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_request_detail"}}},{"type":"object","title":"invalid_invoice_prefix","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/billing.InvoicePrefixIssue"},"error_type":{"const":"invalid_invoice_prefix"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}},{"type":"object","title":"invalid_external_id","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_external_id","required":["external_id","provider","reason"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_external_id"}}},{"type":"object","title":"payment_provider_rejected","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_provider_rejected","required":["code","message","param","provider"],"properties":{"code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"message":{"$ref":"#/components/schemas/std.string.String"},"param":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"payment_provider_rejected"}}},{"type":"object","title":"payment_provider_unavailable","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_provider_unavailable","required":["error_type","message","provider"],"properties":{"error_type":{"$ref":"#/components/schemas/billing.PaymentProviderErrorType"},"message":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"payment_provider_unavailable"}}},{"type":"object","title":"provider_resource_missing","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_resource_missing","required":["external_id","message","provider","resource"],"properties":{"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"message":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"},"resource":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"provider_resource_missing"}}},{"type":"object","title":"provider_idempotency_conflict","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_idempotency_conflict","required":["message","provider"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"provider_idempotency_conflict"}}}]},"billing.CustomerUpdateRequest":{"type":"object","title":"billing.CustomerUpdateRequest","required":["customer_id"],"properties":{"business_id":{"description":"Alter the business entity the customer is attached to","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"customer_type":{"description":"Update customer type: supplier or repairer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CustomerType"}]},"default_tax_rate_id":{"description":"Update default tax rate ID","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"external_id":{"description":"Updated external ID","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"organization_id":{"description":"Link or update the organization this customer belongs to.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"provider":{"description":"Update the external provider","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"tax_jurisdiction":{"description":"Update tax jurisdiction","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.DashboardInvoiceStatusCount":{"type":"object","title":"billing.DashboardInvoiceStatusCount","required":["count","status"],"properties":{"count":{"$ref":"#/components/schemas/i64"},"status":{"$ref":"#/components/schemas/billing.InvoiceStatus"}}},"billing.DashboardRecentInvoiceTotal":{"type":"object","title":"billing.DashboardRecentInvoiceTotal","required":["count","currency_id","total"],"properties":{"count":{"$ref":"#/components/schemas/i64"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"total":{"$ref":"#/components/schemas/std.string.String"}}},"billing.DurationUnit":{"oneOf":[{"const":"week"},{"const":"month"},{"const":"year"}]},"billing.Entitlement":{"type":"object","title":"billing.Entitlement","required":["description","display_name","entitlement_code"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"entitlement_code":{"$ref":"#/components/schemas/std.string.String"}}},"billing.EntitlementOverride":{"description":"API model for EntitlementOverride","type":"object","title":"billing.EntitlementOverride","required":["created_at","entitlement_code","is_active","organization_id","reason","updated_at"],"properties":{"created_at":{"$ref":"#/components/schemas/chrono.NaiveDateTime"},"entitlement_code":{"$ref":"#/components/schemas/std.string.String"},"is_active":{"$ref":"#/components/schemas/bool"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"$ref":"#/components/schemas/chrono.NaiveDateTime"}}},"billing.EntitlementOverridesInsertRequest":{"type":"object","title":"billing.EntitlementOverridesInsertRequest","required":["entitlement_code","is_active","organization_id","reason"],"properties":{"entitlement_code":{"$ref":"#/components/schemas/std.string.String"},"is_active":{"$ref":"#/components/schemas/bool"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.EntitlementOverridesListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.EntitlementOverridesListRequest":{"type":"object","title":"billing.EntitlementOverridesListRequest","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.EntitlementOverridesRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"entitlement_override_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"entitlement_override_not_found","required":["entitlement_code","organization_id"],"properties":{"entitlement_code":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"entitlement_override_not_found"}}}]},"billing.EntitlementOverridesRemoveRequest":{"type":"object","title":"billing.EntitlementOverridesRemoveRequest","required":["entitlement_code","organization_id"],"properties":{"entitlement_code":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.EntitlementOverridesUpsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"entitlement_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"entitlement_not_found","required":["entitlement_code"],"properties":{"entitlement_code":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"entitlement_not_found"}}},{"type":"object","title":"organization_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"organization_not_found","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"organization_not_found"}}}]},"billing.EntitlementsInsertRequest":{"type":"array","prefixItems":[{"allOf":[{"$ref":"#/components/schemas/billing.Entitlement"},{"type":"object","title":"InsertOrElse<billing.Entitlement, IfExistsUpdate>","properties":{"if":{"type":"object","title":"IfConflictOnInsert<IfExistsUpdate>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsUpdate"},"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/MatchCondition"}]}}}}}]}]},"billing.EntitlementsListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.EntitlementsUpsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.EventDetailItem":{"type":"object","title":"billing.EventDetailItem","required":["created_at","id","identifiers","payload","type"],"properties":{"created_at":{"$ref":"#/components/schemas/chrono.NaiveDateTime"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"identifiers":{"$ref":"#/components/schemas/serde_json.Value"},"payload":{"$ref":"#/components/schemas/serde_json.Value"},"type":{"$ref":"#/components/schemas/std.string.String"}}},"billing.EventGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"event_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"event_not_found","required":["event_id"],"properties":{"event_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"event_not_found"}}},{"type":"object","title":"invalid_event_identifiers","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_event_identifiers","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_event_identifiers"}}}]},"billing.EventListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}},{"type":"object","title":"missing_date_parameter","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"missing_date_parameter","properties":{}},"error_type":{"const":"missing_date_parameter"}}},{"type":"object","title":"invalid_date_range","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_date_range","required":["end_date","reason","start_date"],"properties":{"end_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"reason":{"$ref":"#/components/schemas/std.string.String"},"start_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"error_type":{"const":"invalid_date_range"}}}]},"billing.EventListRequest":{"description":"Request to retrieve list of Billing Events.\n\nNote one of `created_before` or `created_after` must be set.","type":"object","title":"billing.EventListRequest","required":["pagination"],"properties":{"created_after":{"description":"Retrieve events created after this date.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"created_before":{"description":"Retrieve events created before this date.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"event_type":{"description":"The type of events to retrieve","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"identifiers":{"description":"Map of identifiers to filter events by.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"pagination":{"$ref":"#/components/schemas/PageRequest"}}},"billing.ExternalProvider":{"oneOf":[{"const":"stripe"},{"const":"xero"},{"const":"internal"}]},"billing.GroupedUsageItem":{"description":"Represents a single item in a grouped usage summary.","type":"object","title":"billing.GroupedUsageItem","required":["dimension_id","dimension_name","total_quantity","unit"],"properties":{"dimension_id":{"description":"ID of the dimension (e.g., customer_id, product_id, meter_id).","$ref":"#/components/schemas/std.string.String"},"dimension_name":{"description":"Name of the dimension (e.g., customer name, product name, meter display name).","$ref":"#/components/schemas/std.string.String"},"meter_id":{"description":"Optional: ID of the usage meter, if relevant and not the dimension itself.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"meter_name":{"description":"Optional: Display name of the usage meter.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"period_end":{"description":"Optional: End of the time period when granularity is specified.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"period_start":{"description":"Optional: Start of the time period when granularity is specified.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"total_quantity":{"description":"Total quantity of usage for this dimension group.","$ref":"#/components/schemas/std.string.String"},"unit":{"description":"Unit of the quantity.","$ref":"#/components/schemas/std.string.String"}}},"billing.InvoiceAttachmentRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"attachment_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"attachment_not_found","required":["attachment_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"attachment_not_found"}}}]},"billing.InvoiceAttachmentRemoveRequest":{"type":"object","title":"billing.InvoiceAttachmentRemoveRequest","required":["attachment_id","invoice_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.InvoiceAttachmentUrlError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"attachment_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"attachment_not_found","required":["attachment_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"attachment_not_found"}}}]},"billing.InvoiceAttachmentUrlRequest":{"type":"object","title":"billing.InvoiceAttachmentUrlRequest","required":["attachment_id","invoice_id"],"properties":{"attachment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.InvoiceAttachmentsInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"invalid_attachment","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_attachment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_attachment"}}}]},"billing.InvoiceAttachmentsInsertRequest":{"type":"object","title":"billing.InvoiceAttachmentsInsertRequest","required":["files","invoice_id"],"properties":{"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentInsertFile"}},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.InvoiceAttachmentsInsertResponse":{"type":"object","title":"billing.InvoiceAttachmentsInsertResponse","required":["attachments"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentDetail"}}}},"billing.InvoiceAttachmentsListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}}]},"billing.InvoiceAttachmentsListRequest":{"type":"object","title":"billing.InvoiceAttachmentsListRequest","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.InvoiceAttachmentsListResponse":{"type":"object","title":"billing.InvoiceAttachmentsListResponse","required":["attachments"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentDetail"}}}},"billing.InvoiceAttachmentsPrepareError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"too_many_attachments","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"too_many_attachments","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}},"error_type":{"const":"too_many_attachments"}}},{"type":"object","title":"attachment_too_large","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"attachment_too_large","required":["max_bytes"],"properties":{"max_bytes":{"$ref":"#/components/schemas/i64"}}},"error_type":{"const":"attachment_too_large"}}},{"type":"object","title":"mime_not_allowed","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"mime_not_allowed","required":["allowed"],"properties":{"allowed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"error_type":{"const":"mime_not_allowed"}}},{"type":"object","title":"invalid_attachment","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_attachment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_attachment"}}}]},"billing.InvoiceAttachmentsPrepareRequest":{"type":"object","title":"billing.InvoiceAttachmentsPrepareRequest","required":["files","invoice_id"],"properties":{"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentPrepareFile"}},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.InvoiceCollectionAttempt":{"type":"object","title":"billing.InvoiceCollectionAttempt","required":["created_at","id","status","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"failure_category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"failure_detail":{"description":"Raw provider failure detail. Returned to Partly staff only.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/billing.CollectionAttemptStatus"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.InvoiceCreateRequest":{"allOf":[{"$ref":"#/components/schemas/billing.InvoiceCreationDetails"},{"description":"Request to create an invoice.\nFor subscription invoices, `subscription_id` must be provided\nand `subscription_period_id` is optional.","type":"object","title":"billing.InvoiceCreateRequest","required":["customer_id"],"properties":{"collection_mode":{"description":"Ad-hoc invoices default to manual collection. Subscription invoices inherit their\nsubscription's collection intent and reject an override.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CollectionMode"}]},"currency_id":{"description":"Optional: Currency for the invoice. Defaults to customer's or system default if not provided.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"customer_id":{"description":"The customer to be invoiced.","$ref":"#/components/schemas/uuid.Uuid"},"due_date":{"description":"Optional: Due date for the invoice.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"metadata":{"description":"Additional custom metadata to be included with the invoice.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"provider":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]}}}]},"billing.InvoiceCreationDetails":{"oneOf":[{"type":"object","title":"subscription","required":["subscription"],"properties":{"subscription":{"type":"object","title":"subscription","required":["subscription_id"],"properties":{"billing_month":{"description":"An explicit billing month in \"YYYY-MM\" format (e.g. \"2026-02\").\nWhen provided, the system derives period boundaries from this month\ninstead of auto-advancing to the next contiguous period.\nMutually exclusive with `subscription_period_id` and `period_start`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"period_start":{"description":"The exact UTC service-period boundary to resolve at issuance time.\nThis remains stable when preview temporarily materializes a period.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"subscription_id":{"description":"The subscription to invoice for.","$ref":"#/components/schemas/uuid.Uuid"},"subscription_period_id":{"description":"A specific subscription period to create an invoice for.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}}}},{"type":"object","title":"ad_hoc","required":["ad_hoc"],"properties":{"ad_hoc":{"type":"object","title":"ad_hoc","required":["items"],"properties":{"items":{"description":"Line items for the ad-hoc invoice.","type":"array","items":{"$ref":"#/components/schemas/billing.InvoiceItemCreateRequest"}}}}}}]},"billing.InvoiceDetail":{"description":"Detailed view of an invoice.","type":"object","title":"billing.InvoiceDetail","required":["collection_mode","created_at","currency_id","customer_id","id","invoice_type","metadata","reference_number","status","subtotal_amount","tax_amount","tax_rate","total_amount","updated_at"],"properties":{"collection_mode":{"$ref":"#/components/schemas/billing.CollectionMode"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"credit_note":{"description":"Credit note data (present only if this invoice is a credit note)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CreditNoteMetadata"}]},"credit_note_requests":{"description":"Credit note requests associated with this invoice (if any)","type":"array","items":{"$ref":"#/components/schemas/billing.CreditNoteRequestSummary"}},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"due_date":{"description":"The date by which payment is due.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"external_ids":{"description":"External identifiers for this invoice from different providers (e.g., Stripe, Xero).","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"invoice_period_end":{"description":"The end of the billing period (UTC timestamp).","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"invoice_period_start":{"description":"The start of the billing period (UTC timestamp).","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"invoice_type":{"$ref":"#/components/schemas/billing.InvoiceType"},"items":{"description":"The invoice's line items.","type":"array","items":{"$ref":"#/components/schemas/billing.InvoiceItem"}},"latest_collection_attempt":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.InvoiceCollectionAttempt"}]},"metadata":{"description":"Custom metadata associated with this invoice.","$ref":"#/components/schemas/serde_json.Value"},"original_invoice_id":{"description":"If this invoice is a credit note (negative invoice), the ID of the original invoice","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"payment_instructions":{"description":"Payment instructions for the invoice (bank details, reference number, etc.)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PaymentInstructionsMetadata"}]},"payment_url":{"description":"Hosted payment URL for paying this invoice. Present only for open\ninvoices with a payment link available; absent otherwise.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reference_number":{"description":"Customer-specific reference number (e.g., ACME-0001)","$ref":"#/components/schemas/std.string.String"},"related_credit_notes":{"description":"Related credit note invoices for this invoice (negative invoices that credit this one)","type":"array","items":{"$ref":"#/components/schemas/billing.RelatedCreditNoteInvoice"}},"status":{"description":"The current status of the invoice (e.g. \"draft\", \"finalized\").","$ref":"#/components/schemas/billing.InvoiceStatus"},"subscription_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"subscription_period_id":{"description":"For subscription invoices, this links to the subscription period.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"subtotal_amount":{"description":"The subtotal calculated before taxes.","$ref":"#/components/schemas/std.string.String"},"tax_amount":{"description":"The tax amount calculated on the subtotal.","$ref":"#/components/schemas/std.string.String"},"tax_rate":{"description":"The tax rate applied as a decimal (0.15 for 15% GST).\nUse this for calculations: tax_amount = subtotal * tax_rate.0","$ref":"#/components/schemas/std.string.String"},"tax_rate_resolution":{"description":"Tax rate resolution details for this invoice.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.TaxRateResolution"}]},"total_amount":{"description":"The final total amount (subtotal + tax).","$ref":"#/components/schemas/std.string.String"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.InvoiceGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}}]},"billing.InvoiceInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}},{"type":"object","title":"price_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_not_found","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_not_found"}}},{"type":"object","title":"subscription_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_not_found","required":["subscription_id"],"properties":{"subscription_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"subscription_not_found"}}},{"type":"object","title":"invalid_parameter","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_parameter","required":["description","name","value"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"invalid_parameter"}}},{"type":"object","title":"invalid_status_transition","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_status_transition","required":["from_status","to_status"],"properties":{"from_status":{"$ref":"#/components/schemas/billing.InvoiceStatus"},"to_status":{"$ref":"#/components/schemas/billing.InvoiceStatus"}}},"error_type":{"const":"invalid_status_transition"}}},{"type":"object","title":"invoice_processing","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_processing","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.InvoiceProcessingDetail"}}},"error_type":{"const":"invoice_processing"}}},{"type":"object","title":"tax_calculation_failed","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"tax_calculation_failed","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"tax_calculation_failed"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}},{"type":"object","title":"period_already_invoiced","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"period_already_invoiced","required":["period_id","subscription_id"],"properties":{"period_id":{"$ref":"#/components/schemas/std.string.String"},"subscription_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"period_already_invoiced"}}},{"type":"object","title":"invoice_prefix_in_use","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_prefix_in_use","required":["prefix"],"properties":{"prefix":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_prefix_in_use"}}},{"type":"object","title":"invoice_prefix_exhausted","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_prefix_exhausted","required":["prefix"],"properties":{"prefix":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_prefix_exhausted"}}}]},"billing.InvoiceItem":{"description":"An individual invoice line item, such as a charge for a particular subscription item.","type":"object","title":"billing.InvoiceItem","required":["id","metadata","quantity","tax_inclusive","unit_amount"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"description":"Metadata, containing at least `description`, may also contain\ntax information, list of usage record IDs for linking to usage etc","$ref":"#/components/schemas/serde_json.Value"},"net_amount":{"description":"Amount before tax (for tax-inclusive items) or same as total amount (for tax-exclusive items)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"price_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"quantity":{"description":"The quantity for this line item.","$ref":"#/components/schemas/std.string.String"},"subscription_item_id":{"description":"For subscription invoices, this links to the subscription item.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"tax_amount":{"description":"Calculated tax amount for this invoice item","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"tax_inclusive":{"description":"Whether the item price includes tax (true) or excludes tax (false)","$ref":"#/components/schemas/bool"},"tax_rate_decimal":{"description":"Tax rate applied to this line item (decimal format: 0.15 for 15% tax).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"tax_rate_id":{"description":"Primary tax rate applied to this invoice item","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"unit_amount":{"description":"The unit charge amount for this line item.","$ref":"#/components/schemas/std.string.String"}}},"billing.InvoiceItemCreateRequest":{"allOf":[{"$ref":"#/components/schemas/billing.InvoiceItemPricing"},{"description":"Represents a new invoice item to be created for ad-hoc invoices.","type":"object","title":"billing.InvoiceItemCreateRequest","required":["description","quantity"],"properties":{"description":{"description":"The description for the line item.","$ref":"#/components/schemas/std.string.String"},"metadata":{"description":"Optional: Additional metadata for the new item.\nThe `description` will be programmatically merged into this metadata (e.g., as `metadata.description`).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"quantity":{"description":"The quantity for the line item.","$ref":"#/components/schemas/std.string.String"},"tax_inclusive":{"description":"Optional: Whether the item price includes tax (defaults to false for tax-exclusive pricing)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}}]},"billing.InvoiceItemPricing":{"oneOf":[{"type":"object","title":"custom","required":["custom"],"properties":{"custom":{"type":"object","title":"custom","required":["unit_amount"],"properties":{"unit_amount":{"description":"The per-unit amount for the line item.","$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"price_id","required":["price_id"],"properties":{"price_id":{"type":"object","title":"price_id","required":["price_id"],"properties":{"price_id":{"description":"Price ID if this ad-hoc item corresponds to a predefined price.","$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"billing.InvoiceItemUpdateRequest":{"description":"Represents an update operation for a single invoice item within an InvoiceUpdateRequest.","type":"object","title":"billing.InvoiceItemUpdateRequest","properties":{"deleted":{"description":"If true and `id` is Some, this item will be deleted.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"description":{"description":"The description for the line item. Required when adding a new manual item.\nStored within the item's metadata field.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"description":"The ID of the item to update or delete. If None, this represents a new item to add.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"metadata":{"description":"Optional: Update the metadata for an existing item.\nNote: `description` updates are handled separately for convenience.\nIf provided during an update, this *replaces* the existing metadata\n(excluding the description managed by the `description` field).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"quantity":{"description":"The quantity for the line item. Required when adding a new item.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"unit_amount":{"description":"The per-unit amount for the line item. Required when adding a new item.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.InvoiceLineBasis":{"oneOf":[{"const":"billed_records","description":"Exactly the usage records the invoice line lists."},{"const":"reselected","description":"The line lists no usage records, so they were selected again as generation would."}]},"billing.InvoiceLineReconciliation":{"type":"object","title":"billing.InvoiceLineReconciliation","required":["later_facts_exist","policy_drift"],"properties":{"later_facts_exist":{"description":"A fresh selection includes usage written after the invoice was generated.","$ref":"#/components/schemas/bool"},"policy_drift":{"description":"A fresh selection differs from the line's records for usage that already existed when\nthe invoice was generated, e.g. after a refund-window policy change.","$ref":"#/components/schemas/bool"}}},"billing.InvoiceListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}},{"type":"object","title":"invalid_date_range","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_date_range","required":["end_date","reason","start_date"],"properties":{"end_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"reason":{"$ref":"#/components/schemas/std.string.String"},"start_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"error_type":{"const":"invalid_date_range"}}}]},"billing.InvoiceListItem":{"type":"object","title":"billing.InvoiceListItem","required":["collection_mode","created_at","currency_id","customer_id","id","invoice_type","reference_number","status"],"properties":{"collection_mode":{"$ref":"#/components/schemas/billing.CollectionMode"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"credit_note":{"description":"Credit note system metadata (present only if this invoice is a credit note)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CreditNoteMetadata"}]},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"due_date":{"description":"The date by which payment is due.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"invoice_period_end":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"invoice_period_start":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"invoice_type":{"$ref":"#/components/schemas/billing.InvoiceType"},"payment_url":{"description":"Hosted payment URL for paying this invoice. Present only for open\ninvoices with a payment link available; absent otherwise.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reference_number":{"description":"Customer-specific reference number (e.g., ACME-0001)","$ref":"#/components/schemas/std.string.String"},"status":{"$ref":"#/components/schemas/billing.InvoiceStatus"},"subscription_id":{"description":"For subscription invoices","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"subscription_period_id":{"description":"For subscription invoices, direct link to the subscription period.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"total_amount":{"description":"The final total amount (subtotal + tax)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.InvoiceListRequest":{"description":"Request to list invoices with optional filters and pagination.","type":"object","title":"billing.InvoiceListRequest","required":["pagination"],"properties":{"created_after":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"created_before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"customer_id":{"description":"Optionally filter by customer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"invoice_type":{"description":"Optionally filter by invoice type (e.g. \"subscription\", \"ad_hoc\").","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.InvoiceType"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"status":{"description":"Optionally filter by invoice status. Can specify multiple statuses to match any of them.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.InvoiceStatus"}}]},"subscription_id":{"description":"Optionally filter by subscription.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"view":{"description":"Select the invoice view perspective (received vs issued).\nFor supplier users with billing_admin/billing_user permissions:\n- Received (default): View invoices where they are the customer\n- Issued: View invoices where they are the issuer\n\nThis parameter is ignored for Partly staff who can see all invoices.","$ref":"#/components/schemas/billing.InvoiceView"}}},"billing.InvoiceOrderDetailListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}}]},"billing.InvoiceOrderDetailListRequest":{"type":"object","title":"billing.InvoiceOrderDetailListRequest","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"pagination":{"description":"Rows are ordered by first confirmation (unknown last), then by order identity.\nDefaults to 100 rows per page; at most 500.","$ref":"#/components/schemas/PageRequest"}}},"billing.InvoiceOrderDetailPage":{"description":"The orders behind an invoice's metered lines, computed from the usage records each line was\npriced from. A line that lists its records (in `invoice_line_sources`, or in\n`usage_record_ids` on lines generated before it) is pinned to exactly those; a line that lists\nnone falls back to the selection invoice generation applies.","type":"object","title":"billing.InvoiceOrderDetailPage","required":["invoice_id","items","meter_totals","pagination"],"properties":{"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"items":{"description":"One row per billed order, keyed by `source_id` (`procurement_id(order_id)` for facts\nthat predate the promoted column). Facts with neither share one row.","type":"array","items":{"$ref":"#/components/schemas/billing.BilledOrder"}},"meter_totals":{"description":"One entry per metered invoice line, in invoice-line order, summed across every row, not\nonly this page. For a `billed_records` line, `net_quantity` equals the usage the line was\npriced from: the sum of the quantities of the records it lists.","type":"array","items":{"$ref":"#/components/schemas/billing.BilledMeterTotal"}},"pagination":{"description":"`total_count` counts rows across every page.","$ref":"#/components/schemas/ForwardPaginationWithTotal"},"period_end":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"period_start":{"description":"The subscription period; absent for invoices without one, such as ad-hoc invoices.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"billing.InvoiceOverdueStatusError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.InvoiceOverdueStatusRequest":{"description":"Request to check if the current organization has overdue invoices.","type":"object","title":"billing.InvoiceOverdueStatusRequest","properties":{}},"billing.InvoiceOverdueStatusResponse":{"description":"Overdue-invoice status for the calling organization: whether any payable invoice is past due,\nwhen access to paid features will be (or was) suspended for non-payment, the outstanding\nbalance, and where to pay it.","type":"object","title":"billing.InvoiceOverdueStatusResponse","required":["has_overdue_invoices","is_suspended"],"properties":{"access_cutoff_at":{"description":"When access to the features granted by an overdue subscription will be (or was) suspended for non-payment. Only overdue subscription invoices put access at risk; other overdue invoices are reported without a cutoff. Absent when nothing is at risk.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"has_overdue_invoices":{"description":"True when the organization has an open invoice with a positive balance past its due date. Invoices with nothing to pay never count.","$ref":"#/components/schemas/bool"},"is_suspended":{"description":"True once `access_cutoff_at` has passed and the overdue subscription's features are suspended.","$ref":"#/components/schemas/bool"},"overdue_invoices":{"description":"Every payable overdue invoice, oldest first, each with a link to pay it when one is available — the affordance to clear the whole balance.","type":"array","items":{"$ref":"#/components/schemas/billing.OverdueInvoiceLink"}},"overdue_totals":{"description":"Outstanding overdue balance per currency, oldest currency first — one entry for each currency the customer has payable overdue debt in. Empty when there is no overdue debt. Summing the entries gives the full outstanding balance even when debt spans currencies.","type":"array","items":{"$ref":"#/components/schemas/billing.OverdueCurrencyTotal"}},"payment_url":{"description":"Hosted payment link for the oldest overdue invoice. Retained for the banner's single \"Pay now\" affordance; prefer `overdue_invoices` to clear the full balance.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"settlement_url":{"description":"Optional account-level link to settle the whole balance in one place (e.g. a Stripe billing-portal session), when the payment provider offers one. Absent otherwise.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.InvoicePrefixIssue":{"oneOf":[{"type":"object","title":"already_in_use","required":["details","issue"],"properties":{"details":{"type":"object","title":"already_in_use","properties":{}},"issue":{"const":"already_in_use"}}},{"type":"object","title":"too_long","required":["details","issue"],"properties":{"details":{"type":"object","title":"too_long","required":["actual_length","max_length"],"properties":{"actual_length":{"$ref":"#/components/schemas/usize"},"max_length":{"$ref":"#/components/schemas/usize"}}},"issue":{"const":"too_long"}}},{"type":"object","title":"empty","required":["details","issue"],"properties":{"details":{"type":"object","title":"empty","properties":{}},"issue":{"const":"empty"}}},{"type":"object","title":"invalid_characters","required":["details","issue"],"properties":{"details":{"type":"object","title":"invalid_characters","properties":{}},"issue":{"const":"invalid_characters"}}},{"type":"object","title":"not_a_string","required":["details","issue"],"properties":{"details":{"type":"object","title":"not_a_string","properties":{}},"issue":{"const":"not_a_string"}}}]},"billing.InvoiceProcessingDetail":{"oneOf":[{"type":"object","title":"invalid_metadata","required":["details","error_type"],"properties":{"details":{"type":"object","title":"invalid_metadata","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_metadata"}}},{"type":"object","title":"subscription_period_mismatch","required":["details","error_type"],"properties":{"details":{"type":"object","title":"subscription_period_mismatch","required":["period_id","subscription_id"],"properties":{"period_id":{"$ref":"#/components/schemas/uuid.Uuid"},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"error_type":{"const":"subscription_period_mismatch"}}},{"type":"object","title":"period_already_invoiced","required":["details","error_type"],"properties":{"details":{"type":"object","title":"period_already_invoiced","required":["period_id"],"properties":{"period_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"error_type":{"const":"period_already_invoiced"}}},{"type":"object","title":"snapshot_parsing_failed","required":["details","error_type"],"properties":{"details":{"type":"object","title":"snapshot_parsing_failed","required":["period_id","reason"],"properties":{"period_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"snapshot_parsing_failed"}}},{"type":"object","title":"order_processing_failed","required":["details","error_type"],"properties":{"details":{"type":"object","title":"order_processing_failed","required":["period_id","reason"],"properties":{"period_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"order_processing_failed"}}},{"type":"object","title":"period_operation_failed","required":["details","error_type"],"properties":{"details":{"type":"object","title":"period_operation_failed","required":["reason","subscription_id"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"error_type":{"const":"period_operation_failed"}}},{"type":"object","title":"usage_record_processing_failed","required":["details","error_type"],"properties":{"details":{"type":"object","title":"usage_record_processing_failed","required":["meter_id","reason"],"properties":{"meter_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"usage_record_processing_failed"}}},{"type":"object","title":"price_calculation_failed","required":["details","error_type"],"properties":{"details":{"type":"object","title":"price_calculation_failed","required":["price_id","reason"],"properties":{"price_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_calculation_failed"}}},{"type":"object","title":"generic","required":["details","error_type"],"properties":{"details":{"type":"object","title":"generic","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"generic"}}}]},"billing.InvoiceStatus":{"oneOf":[{"const":"draft"},{"const":"open"},{"const":"paid"},{"const":"uncollectible"},{"const":"void"}]},"billing.InvoiceType":{"oneOf":[{"const":"subscription"},{"const":"ad_hoc"}]},"billing.InvoiceUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"invalid_parameter","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_parameter","required":["description","name","value"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"invalid_parameter"}}},{"type":"object","title":"invalid_status_transition","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_status_transition","required":["from_status","to_status"],"properties":{"from_status":{"$ref":"#/components/schemas/billing.InvoiceStatus"},"to_status":{"$ref":"#/components/schemas/billing.InvoiceStatus"}}},"error_type":{"const":"invalid_status_transition"}}},{"type":"object","title":"operation_not_allowed","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"operation_not_allowed","required":["operation","reason"],"properties":{"operation":{"$ref":"#/components/schemas/std.string.String"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"operation_not_allowed"}}},{"type":"object","title":"payment_provider_rejected","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_provider_rejected","required":["code","message","param","provider"],"properties":{"code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"message":{"$ref":"#/components/schemas/std.string.String"},"param":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"payment_provider_rejected"}}},{"type":"object","title":"payment_provider_unavailable","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_provider_unavailable","required":["error_type","message","provider"],"properties":{"error_type":{"$ref":"#/components/schemas/billing.PaymentProviderErrorType"},"message":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"payment_provider_unavailable"}}},{"type":"object","title":"provider_resource_missing","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_resource_missing","required":["external_id","message","provider","resource"],"properties":{"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"message":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"},"resource":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"provider_resource_missing"}}},{"type":"object","title":"provider_idempotency_conflict","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_idempotency_conflict","required":["message","provider"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"provider_idempotency_conflict"}}},{"description":"The invoice's reference number collides with an existing invoice at the payment\nprovider (e.g. Stripe rejects a duplicate `number`). Caller-actionable: pick a unique\nnumber / invoice prefix.","type":"object","title":"duplicate_invoice_number","required":["error_details","error_type"],"properties":{"error_details":{"description":"The invoice's reference number collides with an existing invoice at the payment\nprovider (e.g. Stripe rejects a duplicate `number`). Caller-actionable: pick a unique\nnumber / invoice prefix.","type":"object","title":"duplicate_invoice_number","required":["message","provider"],"properties":{"message":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"duplicate_invoice_number"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}},{"type":"object","title":"concurrent_modification","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"concurrent_modification","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"error_type":{"const":"concurrent_modification"}}},{"type":"object","title":"provider_contact_already_linked","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_contact_already_linked","required":["existing_customer_id","provider"],"properties":{"existing_customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"provider":{"$ref":"#/components/schemas/billing.ExternalProvider"}}},"error_type":{"const":"provider_contact_already_linked"}}}]},"billing.InvoiceUpdateRequest":{"type":"object","title":"billing.InvoiceUpdateRequest","required":["invoice_id"],"properties":{"due_date":{"description":"Optional: New due date for the invoice. Only allowed if invoice status is 'draft'.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"items":{"description":"Optional list of invoice item modifications. Only allowed if invoice status is 'draft'.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.InvoiceItemUpdateRequest"}}]},"metadata":{"description":"Optional new custom metadata that replaces the existing invoice metadata.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"status":{"description":"The new status for the invoice (e.g. \"draft\", \"open\", \"paid\", \"void\", \"uncollectible\").","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.InvoiceStatus"}]},"sync_to_provider":{"description":"Optional: Request to synchronize a manually collected invoice with an external provider.\nAutomatic invoices are submitted only through the durable CollectionAttempt workflow.\nThis endpoint rejects an automatic invoice before performing provider I/O.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderSyncDetails"}]}}},"billing.InvoiceView":{"oneOf":[{"const":"received","description":"Filter by customer_id = requesting_customer_id (invoices received from Partly).\nThis is the default view for supplier portal users.\nWhen no status is specified, defaults to showing only 'open' and 'paid' invoices."},{"const":"issued","description":"Filter by issuer_id = requesting_customer_id (invoices issued to downstream customers).\nThis maintains the current behavior for suppliers managing their own invoicing."}]},"billing.MandateAmountBasis":{"oneOf":[{"const":"fixed"},{"const":"variable"}]},"billing.MandateCadence":{"oneOf":[{"const":"scheduled_monthly"},{"const":"unscheduled"}]},"billing.NoteDetail":{"description":"A committed note, returned by `list`, `insert` and `update`.","type":"object","title":"billing.NoteDetail","required":["body","created_at","created_by_user_id","customer_id","id","invoice_id","is_internal","updated_at"],"properties":{"body":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"created_by_user_id":{"description":"Id of the user who authored the note; null for system-created notes.\nResolve the author's details via `entities.users[created_by_user_id]`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"customer_id":{"description":"Owning customer (always set; derived from the invoice for an invoice note).","$ref":"#/components/schemas/uuid.Uuid"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"invoice_id":{"description":"Set only when the note is pinned to a specific invoice.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"is_internal":{"description":"When true, the note is internal to the issuer and not shared with the\ncustomer.","$ref":"#/components/schemas/bool"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.NoteEntities":{"description":"Entities referenced by a note response, keyed by id. Today only `users` (note\nauthors); resolved server-side so a note can reference a user by id without\ncarrying its full details.","type":"object","title":"billing.NoteEntities","properties":{"users":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/billing.NoteUser"}}}},"billing.NoteInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"invalid_note","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_note","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_note"}}}]},"billing.NoteInsertRequest":{"type":"object","title":"billing.NoteInsertRequest","required":["body","parent"],"properties":{"body":{"$ref":"#/components/schemas/std.string.String"},"parent":{"$ref":"#/components/schemas/billing.NoteParent"}}},"billing.NoteInsertResponse":{"type":"object","title":"billing.NoteInsertResponse","required":["entities","note"],"properties":{"entities":{"description":"The note's author, keyed by id (empty for a system-authored note).","$ref":"#/components/schemas/billing.NoteEntities"},"note":{"$ref":"#/components/schemas/billing.NoteDetail"}}},"billing.NoteListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}}]},"billing.NoteListRequest":{"type":"object","title":"billing.NoteListRequest","required":["parent"],"properties":{"cursor":{"description":"Page backwards in time from this note id (exclusive). Pass the previous\npage's `next_cursor`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"limit":{"description":"Page size. Defaults to 50, capped at 200.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"parent":{"$ref":"#/components/schemas/billing.NoteParent"}}},"billing.NoteListResponse":{"type":"object","title":"billing.NoteListResponse","required":["entities","next_cursor","notes"],"properties":{"entities":{"description":"Users referenced by the returned notes (authors), keyed by id.","$ref":"#/components/schemas/billing.NoteEntities"},"next_cursor":{"description":"Present when more notes are available; pass as the next `cursor`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"notes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.NoteDetail"}}}},"billing.NoteParent":{"oneOf":[{"type":"object","title":"customer","required":["customer_id","kind"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"customer"}}},{"type":"object","title":"invoice","required":["invoice_id","kind"],"properties":{"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"invoice"}}}]},"billing.NoteRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"note_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"note_not_found","required":["note_id"],"properties":{"note_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"note_not_found"}}}]},"billing.NoteRemoveRequest":{"type":"object","title":"billing.NoteRemoveRequest","required":["note_id"],"properties":{"note_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.NoteUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"note_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"note_not_found","required":["note_id"],"properties":{"note_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"note_not_found"}}},{"type":"object","title":"invalid_note","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_note","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_note"}}}]},"billing.NoteUpdateRequest":{"type":"object","title":"billing.NoteUpdateRequest","required":["body","note_id"],"properties":{"body":{"$ref":"#/components/schemas/std.string.String"},"note_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.NoteUpdateResponse":{"type":"object","title":"billing.NoteUpdateResponse","required":["entities","note"],"properties":{"entities":{"description":"The note's author, keyed by id (empty for a system-authored note).","$ref":"#/components/schemas/billing.NoteEntities"},"note":{"$ref":"#/components/schemas/billing.NoteDetail"}}},"billing.NoteUser":{"description":"A user referenced by a note response — the note's author. Look up a note's\nauthor by its `created_by_user_id` in `entities.users`; the details reflect\nthe user at read time.","type":"object","title":"billing.NoteUser","required":["email","id","name"],"properties":{"email":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"billing.OverdueCurrencyTotal":{"description":"Outstanding overdue balance in a single currency. `InvoiceOverdueStatusResponse.overdue_totals`\ncarries one entry per currency the customer has payable overdue debt in, so a client can render\nthe full balance even when debt spans currencies.","type":"object","title":"billing.OverdueCurrencyTotal","required":["currency_id","total"],"properties":{"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"total":{"description":"Total still payable across this currency's overdue invoices.","$ref":"#/components/schemas/std.string.String"}}},"billing.OverdueInvoiceLink":{"description":"A single payable overdue invoice with a link to pay it when one is available. Aggregated into\n`InvoiceOverdueStatusResponse.overdue_invoices` so a customer can clear their whole balance,\none invoice at a time, rather than only the oldest.","type":"object","title":"billing.OverdueInvoiceLink","required":["amount","currency_id","id","reference_number"],"properties":{"amount":{"description":"Outstanding balance still payable on this invoice.","$ref":"#/components/schemas/std.string.String"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"due_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"payment_url":{"description":"Hosted page to pay this invoice. Present when the invoice is synced to a payment\nprovider and a link is available; absent otherwise.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reference_number":{"description":"Customer-specific reference number (e.g., ACME-0001).","$ref":"#/components/schemas/std.string.String"}}},"billing.PaymentDetail":{"description":"A payment row, returned by `list`, `insert` and `update`.","type":"object","title":"billing.PaymentDetail","required":["amount","created_at","currency_id","customer_id","id","invoice_id","is_manual","method","note","paid_at","provider","reference"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_manual":{"description":"True when `provider == internal` — the row is editable through this API.","$ref":"#/components/schemas/bool"},"method":{"description":"Tender method for a staff-recorded payment; absent for provider-originated payments.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PaymentTenderMethod"}]},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"paid_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"provider":{"$ref":"#/components/schemas/billing.PaymentProvider"},"reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.PaymentInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invoice_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invoice_not_found","required":["invoice_id"],"properties":{"invoice_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invoice_not_found"}}},{"type":"object","title":"invalid_payment","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_payment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_payment"}}},{"type":"object","title":"idempotency_key_conflict","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"idempotency_key_conflict","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"idempotency_key_conflict"}}}]},"billing.PaymentInsertRequest":{"type":"object","title":"billing.PaymentInsertRequest","required":["amount","invoice_id","method","paid_at"],"properties":{"amount":{"description":"Gross amount received, validated `> 0`.","$ref":"#/components/schemas/std.string.String"},"idempotency_key":{"description":"When present, stored as `provider_payment_id` so the partial unique index\ndedups replays / double-clicks. It must contain 1 to 255 characters. A replay\nreturns the existing row with `deduplicated = true` only when all payment\ninputs match; reuse for different inputs returns an idempotency conflict.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"invoice_id":{"description":"The invoice the payment settles; `customer_id` and `currency_id` are derived\nfrom it server-side.","$ref":"#/components/schemas/uuid.Uuid"},"method":{"$ref":"#/components/schemas/billing.PaymentTenderMethod"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"paid_at":{"description":"Settlement instant, validated `<= now()`.","type":"string","format":"date-time"},"reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.PaymentInsertResponse":{"type":"object","title":"billing.PaymentInsertResponse","required":["deduplicated","payment"],"properties":{"deduplicated":{"description":"True when `idempotency_key` matched an existing row (no new row inserted).","$ref":"#/components/schemas/bool"},"payment":{"$ref":"#/components/schemas/billing.PaymentDetail"}}},"billing.PaymentInstructionsMetadata":{"description":"Payment instructions for an invoice","type":"object","title":"billing.PaymentInstructionsMetadata","properties":{"bank_transfer":{"description":"Structured bank transfer details, if applicable","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.BankTransferDetails"}]}}},"billing.PaymentListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_request","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_request","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_request"}}}]},"billing.PaymentListRequest":{"type":"object","title":"billing.PaymentListRequest","required":["parent"],"properties":{"currency_id":{"description":"Optional currency filter for a `Customer` parent.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"parent":{"$ref":"#/components/schemas/billing.PaymentParent"}}},"billing.PaymentListResponse":{"type":"object","title":"billing.PaymentListResponse","required":["payments"],"properties":{"payments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.PaymentDetail"}}}},"billing.PaymentMandateState":{"oneOf":[{"const":"active"},{"const":"revoked"}]},"billing.PaymentMandateSummaryItem":{"description":"Latest verified mandate for the displayed method. Readiness is reported separately because a\nsingle-use or revoked mandate cannot back automatic collection.","type":"object","title":"billing.PaymentMandateSummaryItem","required":["accepted_at","id","state","terms","usage"],"properties":{"accepted_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"state":{"$ref":"#/components/schemas/billing.PaymentMandateState"},"terms":{"$ref":"#/components/schemas/billing.PaymentMandateTerms"},"usage":{"$ref":"#/components/schemas/billing.PaymentMandateUsage"}}},"billing.PaymentMandateTerms":{"type":"object","title":"billing.PaymentMandateTerms","required":["amount_basis","amount_determination","cadence","currency_scope","future_use","merchant_initiated","starts_at"],"properties":{"amount_basis":{"$ref":"#/components/schemas/billing.MandateAmountBasis"},"amount_determination":{"$ref":"#/components/schemas/std.string.String"},"cadence":{"$ref":"#/components/schemas/billing.MandateCadence"},"currency_scope":{"description":"ISO-4217 uppercase currency codes. Empty means no currency is authorised.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"ends_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"future_use":{"$ref":"#/components/schemas/bool"},"maximum_amount":{"description":"Upper bound per collection when the agreement has one.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"merchant_initiated":{"$ref":"#/components/schemas/bool"},"starts_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"total_cycles":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"billing.PaymentMandateUsage":{"oneOf":[{"const":"multi_use"},{"const":"single_use"}]},"billing.PaymentMethodRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"payment_method_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_method_not_found","required":["payment_method_id"],"properties":{"payment_method_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"payment_method_not_found"}}}]},"billing.PaymentMethodRemoveRequest":{"type":"object","title":"billing.PaymentMethodRemoveRequest","required":["customer_id","payment_method_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"payment_method_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.PaymentMethodSetupError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"setup_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"setup_not_found","required":["setup_id"],"properties":{"setup_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"setup_not_found"}}},{"type":"object","title":"provider_unavailable","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"provider_unavailable","required":["provider"],"properties":{"provider":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"provider_unavailable"}}},{"type":"object","title":"invalid_mandate","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_mandate","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_mandate"}}},{"type":"object","title":"idempotency_conflict","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"idempotency_conflict","properties":{}},"error_type":{"const":"idempotency_conflict"}}},{"type":"object","title":"hosted_action_unavailable","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"hosted_action_unavailable","properties":{}},"error_type":{"const":"hosted_action_unavailable"}}}]},"billing.PaymentMethodSetupGetRequest":{"type":"object","title":"billing.PaymentMethodSetupGetRequest","required":["setup_id"],"properties":{"setup_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.PaymentMethodSetupItem":{"type":"object","title":"billing.PaymentMethodSetupItem","required":["customer_id","expires_at","id","mandate_terms","provider","ready_for_automatic_collection","status"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"failure_category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"mandate_terms":{"$ref":"#/components/schemas/billing.PaymentMandateTerms"},"next_action":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PaymentMethodSetupNextAction"}]},"payment_method":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.SanitisedPaymentMethodItem"}]},"provider":{"$ref":"#/components/schemas/billing.PaymentSetupProvider"},"ready_for_automatic_collection":{"$ref":"#/components/schemas/bool"},"status":{"$ref":"#/components/schemas/billing.PaymentMethodSetupStatus"}}},"billing.PaymentMethodSetupNextAction":{"oneOf":[{"type":"object","title":"hosted_redirect","required":["expires_at","kind","url"],"properties":{"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"hosted_redirect"},"url":{"$ref":"#/components/schemas/std.string.String"}}}]},"billing.PaymentMethodSetupStartRequest":{"type":"object","title":"billing.PaymentMethodSetupStartRequest","required":["customer_id","idempotency_key","return_url"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"idempotency_key":{"$ref":"#/components/schemas/std.string.String"},"return_url":{"$ref":"#/components/schemas/std.string.String"}}},"billing.PaymentMethodSetupStatus":{"oneOf":[{"const":"pending"},{"const":"requires_customer_action"},{"const":"processing"},{"const":"succeeded"},{"const":"failed"},{"const":"expired"}]},"billing.PaymentMethodState":{"oneOf":[{"const":"active"},{"const":"revoking"},{"const":"inactive"}]},"billing.PaymentMethodsListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}}]},"billing.PaymentMethodsListRequest":{"type":"object","title":"billing.PaymentMethodsListRequest","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.PaymentMethodsListResponse":{"type":"object","title":"billing.PaymentMethodsListResponse","required":["payment_methods","ready_for_automatic_collection"],"properties":{"active_collection_profile":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CollectionProfileSummaryItem"}]},"active_mandate":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PaymentMandateSummaryItem"}]},"billing_currency_code":{"description":"ISO-4217 code to scope a new mandate to. Profile scope wins; else most-recent invoice currency.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"in_progress_setup":{"description":"Latest non-terminal setup (lazily expiry-projected) so an in-progress flow is resumable.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PaymentMethodSetupItem"}]},"payment_methods":{"description":"Sanitised current methods, including methods whose revocation is pending or complete.","type":"array","items":{"$ref":"#/components/schemas/billing.SanitisedPaymentMethodItem"}},"ready_for_automatic_collection":{"description":"Customer has an active method+mandate+profile ready for merchant-initiated collection.","$ref":"#/components/schemas/bool"}}},"billing.PaymentParent":{"oneOf":[{"type":"object","title":"customer","required":["customer_id","kind"],"properties":{"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"customer"}}},{"type":"object","title":"invoice","required":["invoice_id","kind"],"properties":{"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"invoice"}}}]},"billing.PaymentProvider":{"oneOf":[{"const":"stripe"},{"const":"internal"},{"const":"xero"}]},"billing.PaymentProviderErrorType":{"oneOf":[{"const":"authentication_failed"},{"const":"insufficient_funds"},{"const":"card_declined"},{"const":"network_error"},{"const":"rate_limited"},{"const":"invalid_request"},{"const":"api_error"},{"const":"service_unavailable"},{"const":"duplicate_invoice_number","description":"The invoice number/reference is already in use by another invoice in the payment provider.\nThis typically happens when syncing an invoice to Stripe and the reference_number\nconflicts with an existing Stripe invoice (either from another customer with the same\nprefix, or a manually created invoice in Stripe).\n\nResolution: Void the draft invoice and update the customer's invoice prefix to be unique."}]},"billing.PaymentSetupProvider":{"oneOf":[{"const":"stripe"},{"const":"airwallex"}]},"billing.PaymentTenderMethod":{"oneOf":[{"const":"bank_transfer"},{"const":"card"},{"const":"cash"},{"const":"cheque"},{"const":"other"}]},"billing.PaymentUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"payment_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_not_found","required":["payment_id"],"properties":{"payment_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"payment_not_found"}}},{"type":"object","title":"payment_not_editable","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"payment_not_editable","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"payment_not_editable"}}},{"type":"object","title":"invalid_payment","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_payment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_payment"}}}]},"billing.PaymentUpdateRequest":{"description":"Full-replacement update of a manual payment's editable state. The request always\ncarries the complete editable block; `reference` / `note` absent-or-null means\n\"cleared\".","type":"object","title":"billing.PaymentUpdateRequest","required":["amount","method","paid_at","payment_id"],"properties":{"amount":{"description":"Gross amount received, validated `> 0`.","$ref":"#/components/schemas/std.string.String"},"method":{"$ref":"#/components/schemas/billing.PaymentTenderMethod"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"paid_at":{"description":"Settlement instant, validated `<= now()`.","type":"string","format":"date-time"},"payment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.PaymentUpdateResponse":{"type":"object","title":"billing.PaymentUpdateResponse","required":["payment"],"properties":{"payment":{"$ref":"#/components/schemas/billing.PaymentDetail"}}},"billing.PerUnitRate":{"type":"object","title":"billing.PerUnitRate","required":["unit_amount"],"properties":{"unit_amount":{"description":"Price per unit block","$ref":"#/components/schemas/std.string.String"},"unit_block_size":{"description":"Unit block size (defaults to 1)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]}}},"billing.PriceCreateRequest":{"type":"object","title":"billing.PriceCreateRequest","required":["metadata","pricing_model","product_id"],"properties":{"currency_id":{"description":"Currency defaults to NZD if not provided","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"pricing_model":{"$ref":"#/components/schemas/billing.input.PricingModel"},"product_id":{"description":"The product this price is for","$ref":"#/components/schemas/uuid.Uuid"},"provider":{"description":"Defaults to internal provider","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"recurring":{"description":"Note only a 1-month duration is currently supported for recurring prices","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PriceRecurrence"}]},"state":{"description":"State defaults to 'active' if not provided","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.State"}]},"usage_meter_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"billing.PriceDetailItem":{"type":"object","title":"billing.PriceDetailItem","required":["created_at","currency_id","id","metadata","pricing_model","product_id","provider","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"external_id":{"description":"Only present for external providers","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"pricing_model":{"$ref":"#/components/schemas/billing.output.PricingModel"},"product_id":{"description":"The product this price is for","$ref":"#/components/schemas/uuid.Uuid"},"provider":{"$ref":"#/components/schemas/billing.ProviderType"},"recurring":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PriceRecurrence"}]},"state":{"description":"State defaults to 'active' if not provided","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.State"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"usage_meter_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"billing.PriceGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"price_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_not_found","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_not_found"}}}]},"billing.PriceInput":{"oneOf":[{"$ref":"#/components/schemas/uuid.Uuid"},{"$ref":"#/components/schemas/billing.PriceCreateRequest"}]},"billing.PriceInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}},{"type":"object","title":"currency_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"currency_not_found","required":["currency_id"],"properties":{"currency_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"currency_not_found"}}},{"type":"object","title":"usage_meter_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"usage_meter_not_found","required":["usage_meter_id"],"properties":{"usage_meter_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"usage_meter_not_found"}}},{"type":"object","title":"price_already_exists","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_already_exists","required":["existing_id"],"properties":{"existing_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"price_already_exists"}}},{"type":"object","title":"only_monthly_recurrence_allowed","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"only_monthly_recurrence_allowed","properties":{}},"error_type":{"const":"only_monthly_recurrence_allowed"}}},{"type":"object","title":"invalid_tiered_pricing","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_tiered_pricing","required":["validation_error"],"properties":{"validation_error":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_tiered_pricing"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.PriceListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}}]},"billing.PriceListItem":{"type":"object","title":"billing.PriceListItem","required":["billing_scheme","created_at","id","metadata","product_id","state","updated_at"],"properties":{"billing_scheme":{"$ref":"#/components/schemas/billing.BillingScheme"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"product_id":{"$ref":"#/components/schemas/uuid.Uuid"},"state":{"$ref":"#/components/schemas/billing.State"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.PriceListRequest":{"description":"Request to retrieve list of Product Prices\nwith optional filters.","type":"object","title":"billing.PriceListRequest","required":["pagination","product_id"],"properties":{"currency_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"product_id":{"$ref":"#/components/schemas/uuid.Uuid"},"state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.PriceRecurrence":{"type":"object","title":"billing.PriceRecurrence","required":["interval","interval_count"],"properties":{"interval":{"$ref":"#/components/schemas/billing.DurationUnit"},"interval_count":{"$ref":"#/components/schemas/i32"}}},"billing.PriceRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"price_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_not_found","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_not_found"}}},{"type":"object","title":"price_in_use","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_in_use","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_in_use"}}}]},"billing.PriceTier":{"description":"Structure to define usage based pricing. Note flat_amount and unit_amount are not mutually exclusive\nbut at least one must be provided.","type":"object","title":"billing.PriceTier","properties":{"flat_amount":{"description":"Price for the entire tier","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"unit_amount":{"description":"Price per unit block","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"unit_block_size":{"description":"If the unit block size is 100, then the unit_amount is the price for 100 units.\nDefaults to 1 if not provided.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"up_to":{"description":"Up to and including to this quantity will be contained in the tier.\nThe last tier should not have this set to ensure no upper bound.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}},"billing.PriceUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"price_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_not_found","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_not_found"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.PriceUpdateRequest":{"type":"object","title":"billing.PriceUpdateRequest","required":["id"],"properties":{"external_id":{"description":"Updated external ID","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_provider":{"description":"Update the external provider","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"description":"Replace the metadata","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.State"}]}}},"billing.PricingRevisionDetail":{"type":"object","title":"billing.PricingRevisionDetail","required":["actor","content_hash","created_at","definition","effective_from","effective_to","id","pricing_policy_id","reason"],"properties":{"actor":{"$ref":"#/components/schemas/std.string.String"},"content_hash":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"definition":{"$ref":"#/components/schemas/billing_core.pricing.policy.PolicyDefinition"},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"effective_to":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"pricing_policy_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"billing.PricingWriteError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"type":"object","title":"invalid_input","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.PricingWriteRequest":{"type":"object","title":"billing.PricingWriteRequest","required":["current_revision_id","definition","effective_from","reason","scope","subscription_item_id"],"properties":{"current_revision_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"definition":{"$ref":"#/components/schemas/billing_core.pricing.policy.PolicyDefinition"},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"reason":{"$ref":"#/components/schemas/std.string.String"},"scope":{"$ref":"#/components/schemas/billing.ConfigurationScope"},"subscription_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.ProductCreateRequest":{"type":"object","title":"billing.ProductCreateRequest","required":["description","metadata","name","state"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_provider":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"name":{"$ref":"#/components/schemas/std.string.String"},"state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.State"}]}}},"billing.ProductDetailItem":{"type":"object","title":"billing.ProductDetailItem","required":["created_at","description","entitlements","external_id","external_provider","id","metadata","name","prices","state","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"entitlements":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_provider":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"name":{"$ref":"#/components/schemas/std.string.String"},"prices":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.PriceDetailItem"}},"state":{"$ref":"#/components/schemas/billing.State"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.ProductEntitlementsAddError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}},{"type":"object","title":"entitlement_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"entitlement_not_found","required":["entitlement_code"],"properties":{"entitlement_code":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"entitlement_not_found"}}}]},"billing.ProductEntitlementsAddRequest":{"type":"object","title":"billing.ProductEntitlementsAddRequest","required":["entitlement_code","product_id"],"properties":{"entitlement_code":{"$ref":"#/components/schemas/std.string.String"},"product_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.ProductEntitlementsRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.ProductEntitlementsRemoveRequest":{"type":"object","title":"billing.ProductEntitlementsRemoveRequest","required":["entitlement_code","product_id"],"properties":{"entitlement_code":{"$ref":"#/components/schemas/std.string.String"},"product_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.ProductGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}}]},"billing.ProductInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"product_already_exists","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_already_exists","required":["existing_id"],"properties":{"existing_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"product_already_exists"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.ProductListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}}]},"billing.ProductListItem":{"type":"object","title":"billing.ProductListItem","required":["created_at","id","metadata","name","state","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"name":{"$ref":"#/components/schemas/std.string.String"},"state":{"$ref":"#/components/schemas/billing.State"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.ProductListRequest":{"description":"Request to retrieve list of Partly Product's and Services.\n","type":"object","title":"billing.ProductListRequest","required":["pagination"],"properties":{"pagination":{"$ref":"#/components/schemas/PageRequest"},"state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.ProductRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}},{"type":"object","title":"product_in_use","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_in_use","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_in_use"}}}]},"billing.ProductUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.ProductUpdateRequest":{"type":"object","title":"billing.ProductUpdateRequest","required":["id"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_id":{"description":"Updated external ID of the product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_provider":{"description":"Update the external provider of the product","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.ProviderType"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"description":"Replace the metadata","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.State"}]}}},"billing.ProviderSyncDetails":{"type":"object","title":"billing.ProviderSyncDetails","required":["provider"],"properties":{"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/billing.ProviderType"}}},"billing.ProviderType":{"oneOf":[{"const":"stripe"},{"const":"internal"},{"const":"xero"}]},"billing.RelatedCreditNoteInvoice":{"description":"Summary of a related credit note invoice (negative invoice)","type":"object","title":"billing.RelatedCreditNoteInvoice","required":["amount","created_at","credit_note_invoice_id","reason_code","reference_number","status"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"credit_note_invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"credit_note_request_id":{"description":"Reference to the credit note request that created this (if applicable)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"reason_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reference_number":{"$ref":"#/components/schemas/std.string.String"},"status":{"$ref":"#/components/schemas/billing.InvoiceStatus"}}},"billing.RelationshipDetail":{"type":"object","title":"billing.RelationshipDetail","required":["buyer_business_id","buyer_org_id","created_at","id","relationship_kind","seller_business_id","seller_org_id","subscription_id","updated_at"],"properties":{"buyer_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"buyer_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"relationship_kind":{"$ref":"#/components/schemas/std.string.String"},"seller_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"seller_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.RelationshipEvidenceDetail":{"description":"Committed supporting evidence; it does not establish a commercial classification.","type":"object","title":"billing.RelationshipEvidenceDetail","required":["created_at","filename","id","mime_type","relationship_id","size_bytes","uploaded_by_user_id"],"properties":{"created_at":{"description":"Time when the evidence was attached.","type":"string","format":"date-time"},"filename":{"description":"Display filename.","$ref":"#/components/schemas/std.string.String"},"id":{"description":"Evidence ID to pass to `billing.configuration.relationship-evidence.get`.","$ref":"#/components/schemas/uuid.Uuid"},"mime_type":{"description":"Validated MIME type.","$ref":"#/components/schemas/std.string.String"},"relationship_id":{"description":"Canonical relationship to which the evidence is attached.","$ref":"#/components/schemas/uuid.Uuid"},"size_bytes":{"description":"Validated file size in bytes.","$ref":"#/components/schemas/i64"},"uploaded_by_user_id":{"description":"Staff user who attached the evidence.","$ref":"#/components/schemas/uuid.Uuid"}}},"billing.RelationshipEvidenceInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_file","required":["invalid_file"],"properties":{"invalid_file":{"type":"object","title":"invalid_file","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.RelationshipEvidenceInsertFile":{"description":"Metadata for one uploaded file to attach to a relationship.","type":"object","title":"billing.RelationshipEvidenceInsertFile","required":["filename","mime_type","size_bytes","storage_key"],"properties":{"filename":{"description":"Display filename supplied to `prepare`.","$ref":"#/components/schemas/std.string.String"},"mime_type":{"description":"MIME type supplied to `prepare`; the uploaded bytes must match its file signature.","$ref":"#/components/schemas/std.string.String"},"size_bytes":{"description":"Exact uploaded size in bytes, greater than zero.","$ref":"#/components/schemas/i64"},"storage_key":{"description":"Opaque storage key returned by the matching `prepare` call.","$ref":"#/components/schemas/std.string.String"}}},"billing.RelationshipEvidenceInsertRequest":{"description":"Commit uploaded evidence for one canonical relationship.\nAccepted bytes are copied to a server-owned object that later PUTs cannot change.","type":"object","title":"billing.RelationshipEvidenceInsertRequest","required":["files","relationship_id","scope"],"properties":{"files":{"description":"Uploaded files and their matching prepared storage keys.","type":"array","items":{"$ref":"#/components/schemas/billing.RelationshipEvidenceInsertFile"}},"relationship_id":{"description":"Relationship receiving the evidence.","$ref":"#/components/schemas/uuid.Uuid"},"scope":{"description":"Billing customer and subscription that own the relationship.","$ref":"#/components/schemas/billing.ConfigurationScope"}}},"billing.RelationshipEvidenceInsertResponse":{"description":"Evidence committed by the matching `insert` call.","type":"object","title":"billing.RelationshipEvidenceInsertResponse","required":["evidence"],"properties":{"evidence":{"description":"Committed files in request order.","type":"array","items":{"$ref":"#/components/schemas/billing.RelationshipEvidenceDetail"}}}},"billing.RelationshipEvidenceListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_pagination","required":["invalid_pagination"],"properties":{"invalid_pagination":{"type":"object","title":"invalid_pagination","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"billing.RelationshipEvidenceListRequest":{"description":"List evidence attached to one relationship, newest first.","type":"object","title":"billing.RelationshipEvidenceListRequest","required":["limit","offset","relationship_id","scope"],"properties":{"limit":{"description":"Page size, from 1 to 100.","$ref":"#/components/schemas/i64"},"offset":{"description":"Number of earlier results to skip; must be non-negative.","$ref":"#/components/schemas/i64"},"relationship_id":{"description":"Relationship whose evidence is requested.","$ref":"#/components/schemas/uuid.Uuid"},"scope":{"description":"Billing customer and subscription that own the relationship.","$ref":"#/components/schemas/billing.ConfigurationScope"}}},"billing.RelationshipEvidenceListResponse":{"description":"One page of relationship evidence.","type":"object","title":"billing.RelationshipEvidenceListResponse","required":["evidence"],"properties":{"evidence":{"description":"Committed files ordered newest first.","type":"array","items":{"$ref":"#/components/schemas/billing.RelationshipEvidenceDetail"}}}},"billing.RelationshipEvidencePrepareError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"too_many_attachments","required":["too_many_attachments"],"properties":{"too_many_attachments":{"type":"object","title":"too_many_attachments","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"attachment_too_large","required":["attachment_too_large"],"properties":{"attachment_too_large":{"type":"object","title":"attachment_too_large","required":["max_bytes"],"properties":{"max_bytes":{"$ref":"#/components/schemas/i64"}}}}},{"type":"object","title":"mime_not_allowed","required":["mime_not_allowed"],"properties":{"mime_not_allowed":{"type":"object","title":"mime_not_allowed","required":["allowed"],"properties":{"allowed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"invalid_attachment","required":["invalid_attachment"],"properties":{"invalid_attachment":{"type":"object","title":"invalid_attachment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"billing.RelationshipEvidencePrepareRequest":{"description":"Prepare private uploads for one canonical seller/buyer relationship.\nUpload each file with the returned PUT URL, then call `insert` with its storage key.","type":"object","title":"billing.RelationshipEvidencePrepareRequest","required":["files","relationship_id","scope"],"properties":{"files":{"description":"One to four PDF, JPEG, PNG, or WebP files, up to 20 MiB each and 50 MiB combined.","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentPrepareFile"}},"relationship_id":{"description":"Relationship ID returned by `billing.configuration.relationships.list`.","$ref":"#/components/schemas/uuid.Uuid"},"scope":{"description":"Billing customer and subscription that own the relationship.","$ref":"#/components/schemas/billing.ConfigurationScope"}}},"billing.RelationshipEvidencePrepareResponse":{"description":"Private upload slots in the same order as the requested files.","type":"object","title":"billing.RelationshipEvidencePrepareResponse","required":["uploads"],"properties":{"uploads":{"description":"Signed PUT URLs and opaque storage keys for the requested files.","type":"array","items":{"$ref":"#/components/schemas/billing.AttachmentPrepareUpload"}}}},"billing.RelationshipEvidenceUrlError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"billing.RelationshipEvidenceUrlRequest":{"description":"Request a short-lived private download URL for accepted evidence.","type":"object","title":"billing.RelationshipEvidenceUrlRequest","required":["evidence_id","relationship_id","scope"],"properties":{"evidence_id":{"description":"ID returned by `insert` or `list`.","$ref":"#/components/schemas/uuid.Uuid"},"relationship_id":{"description":"Relationship to which the evidence belongs.","$ref":"#/components/schemas/uuid.Uuid"},"scope":{"description":"Billing customer and subscription that own the relationship.","$ref":"#/components/schemas/billing.ConfigurationScope"}}},"billing.RelationshipInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"type":"object","title":"invalid_input","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.RelationshipInsertRequest":{"type":"object","title":"billing.RelationshipInsertRequest","required":["buyer_business_id","buyer_org_id","reason","scope","seller_business_id","seller_org_id"],"properties":{"buyer_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"buyer_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"$ref":"#/components/schemas/std.string.String"},"scope":{"$ref":"#/components/schemas/billing.ConfigurationScope"},"seller_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"seller_org_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.RelationshipListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"type":"object","title":"invalid_input","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"conflict"}]},"billing.RelationshipListRequest":{"type":"object","title":"billing.RelationshipListRequest","required":["limit","offset","scope"],"properties":{"limit":{"$ref":"#/components/schemas/i64"},"offset":{"$ref":"#/components/schemas/i64"},"scope":{"$ref":"#/components/schemas/billing.ConfigurationScope"}}},"billing.SanitisedPaymentMethodItem":{"type":"object","title":"billing.SanitisedPaymentMethodItem","required":["display_label","expiry_month","expiry_year","id","last_four","method_type","provider","state"],"properties":{"display_label":{"$ref":"#/components/schemas/std.string.String"},"expiry_month":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i16"}]},"expiry_year":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i16"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"last_four":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"method_type":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/billing.PaymentSetupProvider"},"state":{"$ref":"#/components/schemas/billing.PaymentMethodState"}}},"billing.StaffDashboardGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}}]},"billing.StaffDashboardGetRequest":{"type":"object","title":"billing.StaffDashboardGetRequest","properties":{}},"billing.StaffDashboardSummary":{"type":"object","title":"billing.StaffDashboardSummary","required":["events_last_7_days","invoice_status_counts","recent_invoice_totals","total_customers","total_invoices"],"properties":{"events_last_7_days":{"$ref":"#/components/schemas/i64"},"invoice_status_counts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.DashboardInvoiceStatusCount"}},"recent_invoice_totals":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.DashboardRecentInvoiceTotal"}},"total_customers":{"$ref":"#/components/schemas/i64"},"total_invoices":{"$ref":"#/components/schemas/i64"}}},"billing.State":{"oneOf":[{"const":"active"},{"const":"archived"}]},"billing.StatementAging":{"description":"Outstanding open balance as-at the statement's `as_at`, split by how overdue\neach invoice is. Buckets are exclusive and their sum equals\n`total_outstanding`.","type":"object","title":"billing.StatementAging","required":["current","days_1_30","days_31_60","days_over_60","total_outstanding"],"properties":{"current":{"description":"Not yet due, no due date, or an open credit note (negative amount).","$ref":"#/components/schemas/std.string.String"},"days_1_30":{"description":"1 to 30 days overdue.","$ref":"#/components/schemas/std.string.String"},"days_31_60":{"description":"31 to 60 days overdue.","$ref":"#/components/schemas/std.string.String"},"days_over_60":{"description":"More than 60 days overdue.","$ref":"#/components/schemas/std.string.String"},"oldest_overdue":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.StatementOverdueInvoice"}]},"total_outstanding":{"description":"Sum of the four buckets — the outstanding open balance.","$ref":"#/components/schemas/std.string.String"}}},"billing.StatementEntry":{"description":"One line of the statement ledger, in period order.\n\n`amount` is signed (positive raises the balance owed, negative reduces it)\nand tax-inclusive. `balance` is the running balance *after* this entry,\naccumulated from the statement's `opening_balance` through the period.","type":"object","title":"billing.StatementEntry","required":["amount","balance","invoice_id","invoice_status","kind","occurred_at","reference_number"],"properties":{"amount":{"description":"Signed, tax-inclusive amount this event applies to the balance.","$ref":"#/components/schemas/std.string.String"},"balance":{"description":"Running balance owed after applying this entry.","$ref":"#/components/schemas/std.string.String"},"due_date":{"description":"The invoice's due date, when set.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"invoice_id":{"description":"The invoice this entry derives from.","$ref":"#/components/schemas/uuid.Uuid"},"invoice_status":{"description":"The invoice's current status.","$ref":"#/components/schemas/billing.InvoiceStatus"},"kind":{"$ref":"#/components/schemas/billing.StatementEntryKind"},"occurred_at":{"description":"When the event occurred (UTC).","type":"string","format":"date-time"},"reference_number":{"description":"Customer-specific reference number (e.g. ACME-0001).","$ref":"#/components/schemas/std.string.String"}}},"billing.StatementEntryKind":{"oneOf":[{"const":"invoice_issued","description":"A positive invoice was issued (left draft)."},{"const":"credit_note_issued","description":"A credit note (negative invoice) was issued."},{"const":"invoice_paid","description":"An invoice was paid in full."},{"const":"invoice_voided","description":"An invoice was voided, reversing its charge."},{"const":"invoice_written_off","description":"An invoice was written off (marked uncollectible), reducing the balance."}]},"billing.StatementOverdueInvoice":{"description":"The single most-overdue open invoice with a positive outstanding amount, if any.","type":"object","title":"billing.StatementOverdueInvoice","required":["days_overdue","due_date","invoice_id","outstanding","reference_number"],"properties":{"days_overdue":{"description":"Whole days between the statement's `as_at` and the due date.","$ref":"#/components/schemas/i64"},"due_date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"invoice_id":{"$ref":"#/components/schemas/uuid.Uuid"},"outstanding":{"description":"The invoice's outstanding (tax-inclusive) amount.","$ref":"#/components/schemas/std.string.String"},"reference_number":{"$ref":"#/components/schemas/std.string.String"}}},"billing.SubscriptionBillingPolicyChange":{"type":"object","title":"billing.SubscriptionBillingPolicyChange","required":["billing_policy","effective_from"],"properties":{"billing_policy":{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy"},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.SubscriptionBillingPolicyVersion":{"type":"object","title":"billing.SubscriptionBillingPolicyVersion","required":["billing_policy","effective_from","id","revision"],"properties":{"billing_policy":{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy"},"effective_from":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"revision":{"$ref":"#/components/schemas/i64"}}},"billing.SubscriptionCreateRequest":{"type":"object","title":"billing.SubscriptionCreateRequest","required":["customer_id","items"],"properties":{"billing_policy":{"description":"Explicit terms for a Partly-managed subscription. Omission preserves legacy behaviour.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy"}]},"collection_mode":{"description":"Collection intent for future invoices. Payment setup is not required to create\nan active subscription; charging still requires a compatible reusable mandate.","$ref":"#/components/schemas/billing.CollectionMode"},"customer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionItemInput"}},"metadata":{"description":"Optional metadata for the initial subscription period","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"start_date":{"description":"(Optional) start date for the subscription. If not provided, the subscription starts immediately.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"billing.SubscriptionDetailItem":{"type":"object","title":"billing.SubscriptionDetailItem","required":["billing_policy_versions","created_at","current_period","customer","entitlements","history","id","next_billing_period_start","provider","start_date","status","updated_at"],"properties":{"billing_policy_versions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionBillingPolicyVersion"}},"collection_mode":{"description":"Collection preference for newly created invoices, independent of payment-method readiness.\nOptional while clients can receive responses from older pods.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CollectionMode"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"current_billing_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy"}]},"current_period":{"description":"The period containing the requested time, or the latest recorded period when the chain has\nnot yet been materialized through that time.","$ref":"#/components/schemas/billing.SubscriptionPeriodDetail"},"customer":{"description":"The customer this subscription is for","$ref":"#/components/schemas/billing.CustomerIdentityItem"},"entitlements":{"description":"Entitlements granted by this subscription (from products in subscription items)","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"external_id":{"description":"Only present for external providers","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"history":{"description":"Historical subscription periods (immutable snapshots).","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionPeriodListItem"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"next_billing_period_start":{"description":"The server-authoritative boundary at which a deferred update will take effect.","type":"string","format":"date-time"},"provider":{"$ref":"#/components/schemas/billing.ProviderType"},"start_date":{"description":"Subscription level metadata","type":"string","format":"date-time"},"status":{"description":"Status of the subscription","$ref":"#/components/schemas/billing.SubscriptionStatus"},"upcoming_billing_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy"}]},"upcoming_period":{"description":"If there are scheduled changes (updates that were not applied immediately), this shows the subscription state for the next billing period.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.SubscriptionPeriodDetail"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.SubscriptionGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"subscription_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_not_found","required":["subscription_id"],"properties":{"subscription_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"subscription_not_found"}}}]},"billing.SubscriptionInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_billing_policy","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_billing_policy","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_billing_policy"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","required":["customer_id"],"properties":{"customer_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"customer_not_found"}}},{"type":"object","title":"product_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"product_not_found","required":["product_id"],"properties":{"product_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"product_not_found"}}},{"type":"object","title":"price_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_not_found","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_not_found"}}},{"type":"object","title":"currency_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"currency_not_found","required":["currency_id"],"properties":{"currency_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"currency_not_found"}}},{"type":"object","title":"subscription_must_have_items","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_must_have_items","properties":{}},"error_type":{"const":"subscription_must_have_items"}}},{"type":"object","title":"only_monthly_recurrence_allowed","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"only_monthly_recurrence_allowed","properties":{}},"error_type":{"const":"only_monthly_recurrence_allowed"}}},{"type":"object","title":"invalid_tiered_pricing","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_tiered_pricing","required":["validation_error"],"properties":{"validation_error":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_tiered_pricing"}}},{"type":"object","title":"invalid_collection_mode","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_collection_mode","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_collection_mode"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.SubscriptionInvoiceDeliveryStatus":{"oneOf":[{"const":"unknown"},{"const":"queued"},{"const":"accepted"},{"const":"rejected"}]},"billing.SubscriptionInvoicePreview":{"type":"object","title":"billing.SubscriptionInvoicePreview","required":["can_issue","currency_id","due_date","eligible_at","items","period_end","period_start","subscription_id","subtotal_amount","tax_amount","total_amount"],"properties":{"billing_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy"}]},"can_issue":{"$ref":"#/components/schemas/bool"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"due_date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"eligible_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionInvoicePreviewItem"}},"period_end":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"period_start":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"},"subscription_period_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"subtotal_amount":{"$ref":"#/components/schemas/std.string.String"},"tax_amount":{"$ref":"#/components/schemas/std.string.String"},"total_amount":{"$ref":"#/components/schemas/std.string.String"}}},"billing.SubscriptionInvoicePreviewError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"cannot_prepare","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"cannot_prepare","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"cannot_prepare"}}}]},"billing.SubscriptionInvoicePreviewItem":{"type":"object","title":"billing.SubscriptionInvoicePreviewItem","required":["description","net_amount","quantity","tax_amount","unit_amount"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"net_amount":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"$ref":"#/components/schemas/std.string.String"},"tax_amount":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"unit_amount":{"$ref":"#/components/schemas/std.string.String"}}},"billing.SubscriptionInvoicePreviewRequest":{"type":"object","title":"billing.SubscriptionInvoicePreviewRequest","required":["subscription_id"],"properties":{"billing_month":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"period_start":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"},"subscription_period_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"billing.SubscriptionIssuanceConfigureError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_configuration","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_configuration"}}}]},"billing.SubscriptionIssuanceConfigureRequest":{"type":"object","title":"billing.SubscriptionIssuanceConfigureRequest","required":["enabled","first_period_start","subscription_id"],"properties":{"enabled":{"$ref":"#/components/schemas/bool"},"first_period_start":{"description":"Reviewed first Partly-issued service period. Immutable once scheduling is configured.","type":"string","format":"date-time"},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.SubscriptionIssuanceDisposition":{"oneOf":[{"const":"scheduled"},{"const":"paused"},{"const":"retrying"},{"const":"requires_action"}]},"billing.SubscriptionIssuanceGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"subscription_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_not_found","required":["subscription_id"],"properties":{"subscription_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"subscription_not_found"}}}]},"billing.SubscriptionIssuanceGetRequest":{"type":"object","title":"billing.SubscriptionIssuanceGetRequest","required":["subscription_id"],"properties":{"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.SubscriptionIssuanceSchedule":{"type":"object","title":"billing.SubscriptionIssuanceSchedule","required":["disposition","enabled","first_period_start","last_attempt_at","last_delivery_status","last_error","last_invoice_id","next_period_start","pending_invoice_id","subscription_id"],"properties":{"disposition":{"$ref":"#/components/schemas/billing.SubscriptionIssuanceDisposition"},"enabled":{"$ref":"#/components/schemas/bool"},"first_period_start":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"last_attempt_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"last_delivery_status":{"$ref":"#/components/schemas/billing.SubscriptionInvoiceDeliveryStatus"},"last_error":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"last_invoice_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"next_period_start":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"pending_invoice_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"subscription_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.SubscriptionItemDetail":{"type":"object","title":"billing.SubscriptionItemDetail","required":["id","price","quantity"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"price":{"$ref":"#/components/schemas/billing.PriceDetailItem"},"quantity":{"$ref":"#/components/schemas/i32"}}},"billing.SubscriptionItemInput":{"type":"object","title":"billing.SubscriptionItemInput","required":["price","quantity"],"properties":{"price":{"$ref":"#/components/schemas/billing.PriceInput"},"quantity":{"$ref":"#/components/schemas/i32"}}},"billing.SubscriptionItemListItem":{"type":"object","title":"billing.SubscriptionItemListItem","required":["id","price_id","quantity"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"price_id":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"$ref":"#/components/schemas/i32"}}},"billing.SubscriptionListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}},{"type":"object","title":"invalid_date_range","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_date_range","required":["end_date","reason","start_date"],"properties":{"end_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"reason":{"$ref":"#/components/schemas/std.string.String"},"start_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"error_type":{"const":"invalid_date_range"}}}]},"billing.SubscriptionListItem":{"type":"object","title":"billing.SubscriptionListItem","required":["created_at","customer","id","provider","status","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"customer":{"description":"The customer this subscription is for","$ref":"#/components/schemas/billing.CustomerIdentityItem"},"external_id":{"description":"Only present for external providers","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"provider":{"$ref":"#/components/schemas/billing.ProviderType"},"start_date":{"description":"The first billing period boundary. This may be in the future for a scheduled subscription.\nNew servers always populate it; it remains optional in the wire contract so clients can\nread list responses from older pods during a rolling deployment.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"status":{"description":"Status of the subscription","$ref":"#/components/schemas/billing.SubscriptionStatus"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.SubscriptionListRequest":{"type":"object","title":"billing.SubscriptionListRequest","required":["pagination"],"properties":{"customer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.SubscriptionStatus"}]}}},"billing.SubscriptionPeriodDetail":{"type":"object","title":"billing.SubscriptionPeriodDetail","required":["id","items","metadata","period_end","period_start"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"items":{"description":"The list of subscription items (with price and quantity) that will be billed for this period.","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionItemDetail"}},"metadata":{"description":"Any metadata that was recorded for this period.","$ref":"#/components/schemas/serde_json.Value"},"period_end":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"period_start":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.SubscriptionPeriodListItem":{"type":"object","title":"billing.SubscriptionPeriodListItem","required":["created_at","id","items","period_end","period_start","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"items":{"description":"Subscription items used during this period","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionItemListItem"}},"period_end":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"period_start":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.SubscriptionRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"subscription_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_not_found","required":["subscription_id"],"properties":{"subscription_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"subscription_not_found"}}},{"type":"object","title":"subscription_not_removable","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_not_removable","properties":{}},"error_type":{"const":"subscription_not_removable"}}}]},"billing.SubscriptionStatus":{"oneOf":[{"const":"active"},{"const":"trialing"},{"const":"canceled"},{"const":"past_due"},{"const":"incomplete"}]},"billing.SubscriptionUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_billing_policy","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_billing_policy","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_billing_policy"}}},{"type":"object","title":"invalid_collection_mode","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_collection_mode","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_collection_mode"}}},{"type":"object","title":"subscription_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_not_found","required":["subscription_id"],"properties":{"subscription_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"subscription_not_found"}}},{"type":"object","title":"subscription_item_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_item_not_found","required":["item_id"],"properties":{"item_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"subscription_item_not_found"}}},{"type":"object","title":"price_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"price_not_found","required":["price_id"],"properties":{"price_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"price_not_found"}}},{"type":"object","title":"missing_price_for_new_item","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"missing_price_for_new_item","properties":{}},"error_type":{"const":"missing_price_for_new_item"}}},{"type":"object","title":"subscription_must_have_items","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"subscription_must_have_items","properties":{}},"error_type":{"const":"subscription_must_have_items"}}},{"type":"object","title":"invalid_quantity","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_quantity","required":["quantity","reason"],"properties":{"quantity":{"$ref":"#/components/schemas/i32"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_quantity"}}},{"type":"object","title":"conflicting_item_update","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"conflicting_item_update","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"conflicting_item_update"}}},{"type":"object","title":"configuration","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"configuration","required":["detail"],"properties":{"detail":{"$ref":"#/components/schemas/billing.ConfigurationDetail"}}},"error_type":{"const":"configuration"}}}]},"billing.SubscriptionUpdateItemInput":{"type":"object","title":"billing.SubscriptionUpdateItemInput","properties":{"apply_immediately":{"description":"(Optional) Flag to indicate whether the update should be applied immediately.\n- If true, the change is applied to the current subscription period's snapshot.\n- If false (or omitted), the update only affects future subscription periods.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"deleted":{"description":"Set to true to remove the subscription item. Requires `id` to be provided.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"id":{"description":"The ID of the subscription item to update. If omitted, a new item is added.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"price":{"description":"(Optional) New price information.\nThis can either be an existing price ID or a request to create a new price.\nIf supplied, by default it applies to future billing periods.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.PriceInput"}]},"quantity":{"description":"(Optional) New quantity to bill for future periods.\nIf not provided, the existing quantity remains unchanged.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]}}},"billing.SubscriptionUpdateRequest":{"type":"object","title":"billing.SubscriptionUpdateRequest","required":["subscription_id"],"properties":{"billing_policy_change":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.SubscriptionBillingPolicyChange"}]},"collection_mode":{"description":"Changes collection for new invoices only. Omission preserves the existing mode.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.CollectionMode"}]},"items":{"description":"List of updates, additions, or deletions to subscription items","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.SubscriptionUpdateItemInput"}}]},"status":{"description":"Optional new status for the subscription (e.g., active, canceled)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.SubscriptionStatus"}]},"subscription_id":{"description":"The ID of the subscription to update","$ref":"#/components/schemas/uuid.Uuid"}}},"billing.TaxRateCreateRequest":{"type":"object","title":"billing.TaxRateCreateRequest","required":["jurisdiction","name","rate"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"is_default_for_jurisdiction":{"$ref":"#/components/schemas/bool"},"jurisdiction":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"},"rate":{"$ref":"#/components/schemas/std.string.String"}}},"billing.TaxRateDetailItem":{"type":"object","title":"billing.TaxRateDetailItem","required":["created_at","description","external_ids","id","is_default_for_jurisdiction","jurisdiction","name","rate","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_ids":{"description":"External provider IDs for this tax rate","type":"array","items":{"$ref":"#/components/schemas/billing.TaxRateExternalIdItem"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default_for_jurisdiction":{"$ref":"#/components/schemas/bool"},"jurisdiction":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"},"rate":{"$ref":"#/components/schemas/std.string.String"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.TaxRateExternalIdItem":{"description":"Tax Rate External ID models for provider integrations","type":"object","title":"billing.TaxRateExternalIdItem","required":["created_at","external_id","provider","tax_rate_id"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"external_id":{"$ref":"#/components/schemas/std.string.String"},"provider":{"$ref":"#/components/schemas/std.string.String"},"tax_rate_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.TaxRateGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"tax_rate_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"tax_rate_not_found","required":["tax_rate_id"],"properties":{"tax_rate_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"tax_rate_not_found"}}},{"type":"object","title":"customer_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"customer_not_found","properties":{}},"error_type":{"const":"customer_not_found"}}}]},"billing.TaxRateGetRequest":{"type":"object","title":"billing.TaxRateGetRequest","required":["tax_rate_id"],"properties":{"tax_rate_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.TaxRateInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"tax_rate_already_exists","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"tax_rate_already_exists","required":["existing_id","jurisdiction"],"properties":{"existing_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"jurisdiction":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"tax_rate_already_exists"}}},{"type":"object","title":"invalid_tax_rate","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_tax_rate","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_tax_rate"}}},{"type":"object","title":"invalid_jurisdiction","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_jurisdiction","required":["jurisdiction"],"properties":{"jurisdiction":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_jurisdiction"}}}]},"billing.TaxRateListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}}]},"billing.TaxRateListItem":{"type":"object","title":"billing.TaxRateListItem","required":["created_at","description","id","is_default_for_jurisdiction","jurisdiction","name","rate","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default_for_jurisdiction":{"$ref":"#/components/schemas/bool"},"jurisdiction":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"},"rate":{"$ref":"#/components/schemas/std.string.String"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.TaxRateListRequest":{"description":"Request to retrieve list of Tax Rates.","type":"object","title":"billing.TaxRateListRequest","required":["pagination"],"properties":{"is_active":{"description":"Filter by active status","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"jurisdiction":{"description":"Filter by jurisdiction","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"}}},"billing.TaxRateRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"tax_rate_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"tax_rate_not_found","required":["tax_rate_id"],"properties":{"tax_rate_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"tax_rate_not_found"}}},{"type":"object","title":"tax_rate_in_use","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"tax_rate_in_use","required":["tax_rate_id","usage_count"],"properties":{"tax_rate_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"usage_count":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"error_type":{"const":"tax_rate_in_use"}}},{"type":"object","title":"cannot_remove_default_tax_rate","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"cannot_remove_default_tax_rate","required":["jurisdiction","tax_rate_id"],"properties":{"jurisdiction":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"tax_rate_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"error_type":{"const":"cannot_remove_default_tax_rate"}}}]},"billing.TaxRateResolution":{"description":"Information about how the tax rate was resolved for an invoice","type":"object","title":"billing.TaxRateResolution","required":["jurisdiction","tax_rate","tax_rate_id"],"properties":{"jurisdiction":{"description":"The jurisdiction for which this tax rate applies (e.g., \"NZ\", \"ROW\", \"AU\")","$ref":"#/components/schemas/std.string.String"},"tax_rate":{"description":"The tax rate as a decimal (0.15 for 15% GST).","$ref":"#/components/schemas/std.string.String"},"tax_rate_id":{"description":"The ID of the tax rate that was applied","$ref":"#/components/schemas/uuid.Uuid"},"tax_rate_percentage":{"description":"The tax rate as a percentage (15 for 15% GST).\nConvenient for display purposes.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"billing.TaxRateUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"tax_rate_not_found","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"tax_rate_not_found","required":["tax_rate_id"],"properties":{"tax_rate_id":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"tax_rate_not_found"}}},{"type":"object","title":"invalid_tax_rate","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_tax_rate","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_tax_rate"}}},{"type":"object","title":"jurisdiction_modification_not_allowed","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"jurisdiction_modification_not_allowed","properties":{}},"error_type":{"const":"jurisdiction_modification_not_allowed"}}}]},"billing.TaxRateUpdateRequest":{"type":"object","title":"billing.TaxRateUpdateRequest","required":["tax_rate_id"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"is_default_for_jurisdiction":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"jurisdiction":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"rate":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"tax_rate_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing.UsageByDimensionListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}},{"type":"object","title":"invalid_date_range","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_date_range","required":["end_date","start_date"],"properties":{"end_date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"start_date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"error_type":{"const":"invalid_date_range"}}}]},"billing.UsageByDimensionParams":{"description":"Parameters for requesting a usage summary grouped by a dimension.","type":"object","title":"billing.UsageByDimensionParams","required":["dimension","end_date","pagination","start_date"],"properties":{"customer_id":{"description":"Optional: Filter by customer ID.\nLess common if grouping by 'customer', but could be used for \"top products for a specific customer\".","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"dimension":{"description":"Dimension to group usage by.","$ref":"#/components/schemas/billing.UsageDimension"},"end_date":{"description":"End date for the summary period (inclusive), YYYY-MM-DD.","type":"string","format":"date-time"},"granularity":{"description":"Optional granularity for time-series data aggregation. When specified, returns usage data\ngrouped by both the requested dimension and time periods. When omitted, returns total\naggregates grouped by dimension only.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing.UsageSummaryGranularity"}]},"include_empty_periods":{"description":"Optional flag to include time periods with zero usage in results. Defaults to true.\nThis parameter is only applicable when granularity is specified.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"product_id":{"description":"Optional: Filter by product ID.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"start_date":{"description":"Start date for the summary period (inclusive), YYYY-MM-DD.","type":"string","format":"date-time"},"usage_meter_id":{"description":"Optional: Filter by specific usage meter ID.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"billing.UsageDimension":{"oneOf":[{"const":"customer"},{"const":"product"},{"const":"meter"}]},"billing.UsageMeterListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}}]},"billing.UsageMeterListItem":{"type":"object","title":"billing.UsageMeterListItem","required":["created_at","display_name","event_name","external_id","id","metadata","provider","state","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"display_name":{"$ref":"#/components/schemas/std.string.String"},"event_name":{"$ref":"#/components/schemas/std.string.String"},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"provider":{"$ref":"#/components/schemas/std.string.String"},"state":{"$ref":"#/components/schemas/billing.State"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"billing.UsageMeterListRequest":{"description":"Request to retrieve list of Billing Usage Meters\n","type":"object","title":"billing.UsageMeterListRequest","required":["pagination"],"properties":{"pagination":{"$ref":"#/components/schemas/PageRequest"}}},"billing.UsageSummaryGranularity":{"oneOf":[{"const":"day"},{"const":"week"},{"const":"month"}]},"billing.UsageSummaryItem":{"description":"Represents a single period in a time-series usage summary.","type":"object","title":"billing.UsageSummaryItem","required":["period_end","period_start","quantity","unit"],"properties":{"meter_id":{"description":"Optional: ID of the usage meter if the summary is for a specific meter\nor if a product_id was given and it has multiple meters.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"meter_name":{"description":"Optional: Display name of the usage meter.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"period_end":{"description":"End of the period (ISO 8601 datetime string, UTC).","type":"string","format":"date-time"},"period_start":{"description":"Start of the period (ISO 8601 datetime string, UTC).","type":"string","format":"date-time"},"quantity":{"description":"Total quantity of usage within this period.","$ref":"#/components/schemas/std.string.String"},"unit":{"description":"Unit of the quantity (e.g., \"count\", \"GB\").","$ref":"#/components/schemas/std.string.String"}}},"billing.UsageSummaryListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["error_details","error_type"],"properties":{"error_details":{"$ref":"#/components/schemas/auth.AuthError"},"error_type":{"const":"unauthorized"}}},{"type":"object","title":"forbidden","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"forbidden","properties":{}},"error_type":{"const":"forbidden"}}},{"type":"object","title":"invalid_cursor","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_cursor","required":["cursor"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"}}},"error_type":{"const":"invalid_cursor"}}},{"type":"object","title":"invalid_date_range","required":["error_details","error_type"],"properties":{"error_details":{"type":"object","title":"invalid_date_range","required":["end_date","start_date"],"properties":{"end_date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"start_date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"error_type":{"const":"invalid_date_range"}}}]},"billing.UsageSummaryListParams":{"description":"Parameters for requesting a time-series usage summary.","type":"object","title":"billing.UsageSummaryListParams","required":["end_date","pagination","start_date"],"properties":{"customer_id":{"description":"Optional: Filter by customer ID.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"end_date":{"description":"End date for the summary (inclusive), YYYY-MM-DD.\nInterpreted as the end of the day in UTC.","type":"string","format":"date-time"},"granularity":{"description":"Granularity of the summary periods. Defaults to 'day'.","$ref":"#/components/schemas/billing.UsageSummaryGranularity"},"include_empty_periods":{"description":"Optional: Include periods with zero usage. Defaults to true.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"product_id":{"description":"Optional: Filter by billing product ID.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"start_date":{"description":"Start date for the summary (inclusive), YYYY-MM-DD.\nInterpreted as the start of the day in UTC.","type":"string","format":"date-time"},"usage_meter_id":{"description":"Optional: Filter by specific usage meter ID.\nIf both a product and usage meter is provided, the product is used.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"billing.input.FlatRate":{"type":"object","title":"billing.input.FlatRate","properties":{"amount":{"description":"Price","$ref":"#/components/schemas/std.string.String"}}},"billing.input.PricingModel":{"oneOf":[{"type":"object","title":"flat_rate","required":["flat_rate"],"properties":{"flat_rate":{"$ref":"#/components/schemas/billing.input.FlatRate"}}},{"type":"object","title":"per_unit","required":["per_unit"],"properties":{"per_unit":{"$ref":"#/components/schemas/billing.PerUnitRate"}}},{"type":"object","title":"tiered","required":["tiered"],"properties":{"tiered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.PriceTier"}}}}]},"billing.output.FlatRate":{"type":"object","title":"billing.output.FlatRate","required":["amount"],"properties":{"amount":{"description":"Price","$ref":"#/components/schemas/std.string.String"}}},"billing.output.PricingModel":{"oneOf":[{"type":"object","title":"flat_rate","required":["flat_rate"],"properties":{"flat_rate":{"$ref":"#/components/schemas/billing.output.FlatRate"}}},{"type":"object","title":"per_unit","required":["per_unit"],"properties":{"per_unit":{"$ref":"#/components/schemas/billing.PerUnitRate"}}},{"type":"object","title":"tiered","required":["tiered"],"properties":{"tiered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing.PriceTier"}}}}]},"billing_core.facts.SupplyClass":{"oneOf":[{"const":"genuine"},{"const":"oes_aftermarket"},{"const":"non_oes_aftermarket"},{"const":"unknown"}]},"billing_core.pricing.policy.BaselineScope":{"type":"object","title":"billing_core.pricing.policy.BaselineScope","required":["brand_id","network_id","revenue_category","supply_class"],"properties":{"brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"network_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"revenue_category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.pricing.policy.RevenueCategory"}]},"supply_class":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.facts.SupplyClass"}]}}},"billing_core.pricing.policy.BrandRate":{"type":"object","title":"billing_core.pricing.policy.BrandRate","required":["brand_id","rate_bps"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"},"rate_bps":{"$ref":"#/components/schemas/u16"}}},"billing_core.pricing.policy.CoverageAdjustment":{"description":"The rule identifies an approved metric; no customer-specific threshold is implicit.","type":"object","title":"billing_core.pricing.policy.CoverageAdjustment","required":["below_bps","metric_id","rate_multiplier_bps"],"properties":{"below_bps":{"$ref":"#/components/schemas/u16"},"metric_id":{"$ref":"#/components/schemas/uuid.Uuid"},"rate_multiplier_bps":{"$ref":"#/components/schemas/u16"}}},"billing_core.pricing.policy.FactFilter":{"type":"object","title":"billing_core.pricing.policy.FactFilter","required":["brand_id","currency_id","network_id","relationship_class","revenue_category","supply_class","usage_family"],"properties":{"brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"currency_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"network_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"relationship_class":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.pricing.policy.RelationshipClass"}]},"revenue_category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.pricing.policy.RevenueCategory"}]},"supply_class":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.facts.SupplyClass"}]},"usage_family":{"$ref":"#/components/schemas/billing_core.pricing.policy.UsageFamily"}}},"billing_core.pricing.policy.PolicyDefinition":{"type":"object","title":"billing_core.pricing.policy.PolicyDefinition","required":["primitives","version"],"properties":{"primitives":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing_core.pricing.policy.PricingPrimitive"}},"version":{"$ref":"#/components/schemas/u16"}}},"billing_core.pricing.policy.PricingPrimitive":{"type":"object","title":"billing_core.pricing.policy.PricingPrimitive","required":["definition","id"],"properties":{"definition":{"$ref":"#/components/schemas/billing_core.pricing.policy.PrimitiveKind"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"billing_core.pricing.policy.PrimitiveKind":{"oneOf":[{"type":"object","title":"flat_recurring","required":["amount","cadence","currency_id","kind"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"cadence":{"$ref":"#/components/schemas/billing_core.pricing.policy.RecurringCadence"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"flat_recurring"}}},{"type":"object","title":"per_dimension_fee","required":["amount","currency_id","dimension","kind"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"currency_id":{"$ref":"#/components/schemas/uuid.Uuid"},"dimension":{"$ref":"#/components/schemas/billing_core.pricing.policy.SlotDimension"},"kind":{"const":"per_dimension_fee"}}},{"type":"object","title":"rate_schedule_over_facts","required":["brand_overrides","coverage_adjustment","default_rate_bps","filter","kind"],"properties":{"brand_overrides":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/billing_core.pricing.policy.BrandRate"}},"coverage_adjustment":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/billing_core.pricing.policy.CoverageAdjustment"}]},"default_rate_bps":{"$ref":"#/components/schemas/u16"},"filter":{"$ref":"#/components/schemas/billing_core.pricing.policy.FactFilter"},"kind":{"const":"rate_schedule_over_facts"}}},{"type":"object","title":"incremental_over_baseline","required":["baseline_ref","filter","kind","rate_bps"],"properties":{"baseline_ref":{"$ref":"#/components/schemas/uuid.Uuid"},"filter":{"$ref":"#/components/schemas/billing_core.pricing.policy.FactFilter"},"kind":{"const":"incremental_over_baseline"},"rate_bps":{"$ref":"#/components/schemas/u16"}}},{"description":"Converts one derived meter of a usage basis into service credits. The\nenclosing primitive's id identifies the conversion. Rated by the\nservice-credit settlement, never by fact rating.","type":"object","title":"convert_usage_to_service_credits","required":["derived_meter","kind","outcome_filter","rate","usage_basis"],"properties":{"derived_meter":{"$ref":"#/components/schemas/billing_core.service_credits.normalization.DerivedMeter"},"kind":{"const":"convert_usage_to_service_credits"},"outcome_filter":{"$ref":"#/components/schemas/billing_core.service_credits.conversion.OutcomeFilter"},"rate":{"$ref":"#/components/schemas/billing_core.service_credits.conversion.ConversionRate"},"usage_basis":{"$ref":"#/components/schemas/billing_core.service_credits.normalization.UsageBasis"}}}]},"billing_core.pricing.policy.RecurringCadence":{"oneOf":[{"const":"subscription_period"}]},"billing_core.pricing.policy.RelationshipClass":{"oneOf":[{"const":"existing"},{"const":"net_new"},{"const":"excluded"}]},"billing_core.pricing.policy.RevenueCategory":{"oneOf":[{"const":"body_shop_supply"},{"const":"workshop_supply"}]},"billing_core.pricing.policy.SlotDimension":{"oneOf":[{"const":"active_site"},{"const":"active_vehicle_make"}]},"billing_core.pricing.policy.UsageFamily":{"oneOf":[{"const":"gmv"}]},"billing_core.service_credits.conversion.ConversionRate":{"description":"Exact non-negative rational `credit_quanta / source_atomic_units`. A zero\nnumerator marks an explicitly free meter. Both components are at most\n2^53 - 1 (9007199254740991), so they are exact in JSON clients that decode\nnumbers as doubles; the denominator is positive.","type":"object","title":"billing_core.service_credits.conversion.ConversionRate","required":["credit_quanta","source_atomic_units"],"properties":{"credit_quanta":{"$ref":"#/components/schemas/u64"},"source_atomic_units":{"$ref":"#/components/schemas/u64"}}},"billing_core.service_credits.conversion.OutcomeFilter":{"oneOf":[{"const":"all_outcomes"},{"const":"succeeded_only"}]},"billing_core.service_credits.normalization.DerivedMeter":{"oneOf":[{"const":"uncached_input_tokens"},{"const":"cache_read_input_tokens"},{"const":"cache_write_input_tokens"},{"const":"visible_output_tokens"},{"const":"reasoning_output_tokens"}]},"billing_core.service_credits.normalization.UsageBasis":{"oneOf":[{"const":"interpreter_model_tokens_v1","description":"`input_tokens` includes cache reads and writes; `output_tokens` is\nvisible output and excludes `reasoning_output_tokens`."}]},"billing_core.subscriptions.billing_policy.BillingCalendar":{"oneOf":[{"const":"calendar_month"},{"type":"object","title":"monthly_anniversary","required":["monthly_anniversary"],"properties":{"monthly_anniversary":{"type":"object","title":"monthly_anniversary","required":["day"],"properties":{"day":{"$ref":"#/components/schemas/u8"}}}}}]},"billing_core.subscriptions.billing_policy.BillingTiming":{"oneOf":[{"const":"advance"},{"const":"arrears"}]},"billing_core.subscriptions.billing_policy.PaymentTerms":{"oneOf":[{"description":"Elapsed days after actual invoice issuance, preserving the issuance time.","type":"object","title":"days_after_invoice","required":["days_after_invoice"],"properties":{"days_after_invoice":{"description":"Elapsed days after actual invoice issuance, preserving the issuance time.","type":"object","title":"days_after_invoice","required":["days"],"properties":{"days":{"$ref":"#/components/schemas/u16"}}}}},{"description":"End of this UTC calendar day in the eligibility month, or the following month\nif the day precedes eligibility. Days absent from a month use its last day.","type":"object","title":"calendar_day","required":["calendar_day"],"properties":{"calendar_day":{"description":"End of this UTC calendar day in the eligibility month, or the following month\nif the day precedes eligibility. Days absent from a month use its last day.","type":"object","title":"calendar_day","required":["day"],"properties":{"day":{"$ref":"#/components/schemas/u8"}}}}}]},"billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy":{"type":"object","title":"billing_core.subscriptions.billing_policy.SubscriptionBillingPolicy","required":["calendar","payment_terms","timing"],"properties":{"calendar":{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.BillingCalendar"},"payment_terms":{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.PaymentTerms"},"timing":{"$ref":"#/components/schemas/billing_core.subscriptions.billing_policy.BillingTiming"}}},"bool":{"description":"Boolean value","type":"boolean"},"business_network.Business":{"type":"object","title":"business_network.Business","required":["admin_group_id","created_at","id","name","organization_id","profile","updated_at"],"properties":{"admin_group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"$ref":"#/components/schemas/chrono.NaiveDateTime"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"profile":{"$ref":"#/components/schemas/business_network.BusinessProfile"},"updated_at":{"$ref":"#/components/schemas/chrono.NaiveDateTime"}}},"business_network.BusinessProfile":{"oneOf":[{"description":"Supplier configuration.\n\nThis struct is used for both input and output via the API and supports\npartial updates through optional fields.","type":"object","title":"business_network.Supplier","required":["type"],"properties":{"business_phone":{"description":"Business contact phone number.\n\nWhen omitted or explicitly undefined, the value is not changed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oms_emails":{"description":"List of email addresses used by the Order Management System (OMS).\n\nWhen omitted or explicitly undefined, the value is not changed.\nWhen provided, it replaces the previously stored list.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"store_addresses":{"description":"Store addresses associated with the supplier.\n\nUpdate semantics:\n- If `None`, store addresses are **not modified** in the database.\n- If `Some(Vec<...>)`, the vector is treated as the **complete desired state**\nof all store addresses for the supplier.\n\nResolution and synchronization rules:\n- Addresses are matched by **store address ID (UUID)**.\n- If an entry has no ID, a new address is created with a generated UUID.\n- If an address with the same ID exists in the database, its fields are updated.\n- If no address with the given ID exists, a new address entity is created.\n- Any existing database addresses **not present** in the provided vector\nare treated as removed and **will be deleted**.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.SupplierStoreAddress"}}]},"supply":{"description":"Supply configuration per manufacturer.\n\nThe map key is a manufacturer SUID, and the value is the set of supply types\nsupported by this supplier for that manufacturer.\n\nIf `None`, the supply configuration is not changed.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Value set type","type":"array","items":{"$ref":"#/components/schemas/business_network.SupplyType"},"uniqueItems":true}}]},"trading_terms":{"description":"Supplier-published trading terms shown to repairers (e.g. in the\nchoose-supply flow). Belongs to the supplier, not repairer-specific.\n\nWhen omitted or explicitly undefined, the value is not changed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierTradingTerms"}]},"type":{"const":"supplier"}}},{"type":"object","title":"business_network.Repairer","required":["type"],"properties":{"disable_procurement_emails":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"preferences":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.RepairerPreferences"}]},"type":{"const":"repairer"}}},{"type":"object","title":"business_network.RepairerSite","required":["type"],"properties":{"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"preferences":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.RepairerPreferences"}]},"shipping_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/Address"}]},"type":{"const":"repairer_site"}}},{"type":"object","title":"business_network.Insurer","required":["type"],"properties":{"available_contracts":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"notification_email_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"insurer"}}}]},"business_network.BusinessProfileKind":{"oneOf":[{"type":"object","title":"supplier","required":["type"],"properties":{"type":{"const":"supplier"}}},{"type":"object","title":"repairer","required":["type"],"properties":{"type":{"const":"repairer"}}},{"type":"object","title":"repairer_site","required":["type"],"properties":{"type":{"const":"repairer_site"}}},{"type":"object","title":"insurer","required":["type"],"properties":{"type":{"const":"insurer"}}}]},"business_network.EmailOptions":{"description":"**Beta — unstable surface.** General outbound-email configuration for the org, independent of\nany single feature (off-network supplier relays are the first consumer). Expected to evolve;\nexternal integrations must not depend on its shape.","type":"object","title":"business_network.EmailOptions","properties":{"sender_integration_id":{"description":"The id of the integration the org sends outbound email from. When set to a healthy\nMicrosoft 365 mail integration (admin consent granted), email is sent from the org's own\nmailbox; otherwise it falls back to the default relay. `None` ⇒ default relay.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"business_network.Insurer":{"type":"object","title":"business_network.Insurer","properties":{"available_contracts":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"notification_email_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_network.JobSensitivity":{"oneOf":[{"const":"time_sensitive","description":"Prioritize faster delivery over cost optimization"},{"const":"cost_sensitive","description":"Prioritize cost optimization over delivery speed"}]},"business_network.JobTableColumn":{"oneOf":[{"const":"work_provider"},{"const":"readiness"},{"const":"offer_request"}]},"business_network.OffNetworkEmailOptions":{"type":"object","title":"business_network.OffNetworkEmailOptions","properties":{"email_body_text":{"description":"Organization specific email body text sent to off network suppliers for parts requests","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sender_domain":{"description":"Custom sender domain (e.g., \"orders.mycompany.com\")\nDefaults to order-relay.com if not specified","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_network.OrganizationContact":{"description":"Various contact details for an organization","type":"object","title":"business_network.OrganizationContact","required":["addresses","emails","phones","websites"],"properties":{"addresses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/Address"}},"emails":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"phones":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"websites":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"business_network.OrganizationCustomization":{"description":"**Beta — unstable surface.** These fields gate per-org UI/UX behaviour in\n`mfe-repair` and are expected to evolve as the product iterates\n(additions, renames, removals, semantic tweaks). External integrations\nmust not depend on these fields or their defaults; treat the shape as\ninternal and subject to change without notice.","type":"object","title":"business_network.OrganizationCustomization","properties":{"allow_disallowed_offers":{"description":"Allow offers with a DISALLOW evaluation outcome to be selectable (absent/false = NZ: block; true = UK: allow)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"dedupe_single_supplier_baskets":{"description":"Remove single-supplier baskets when the split basket covers only one supplier","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"enable_part_verification":{"description":"Enable part-number verification via the interpreter service","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"favicon":{"description":"Absolute URL to the org's favicon","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hide_offer_recommendation_alerts":{"description":"Hide offer recommendation alerts","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"job_table_columns":{"description":"Which columns to show in the jobs table (absent = NZ default: [offer_request]).\nTransitional: filled server-side when absent; remove resolver once NZ sweep lands.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.JobTableColumn"}}]},"order_note_label":{"description":"Override the order note field label","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_note_required":{"description":"Make the order note field required","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"page_title":{"description":"HTML page title for white-label","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"recommend_basket_label":{"description":"Override the \"Recommended\" basket label (e.g. \"Required\")","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"show_order_feedback":{"description":"Show order feedback dropdown on the order page","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"show_repairer_settings_dialog":{"description":"Show the repairer settings dialog link in the navigation header","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"skip_job_setup_flow":{"description":"Skip redirecting to the job-setup flow after creating a job (absent/false = NZ: use flow; true = UK: skip)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"skip_prefetch_orchestrated_parts":{"description":"Skip prefetching orchestrated parts when a job reaches exact-ready state (absent/false = NZ: prefetch; true = UK: skip)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"use_mfr_type_badges":{"description":"Display OEM/OES/Aftermarket condition badges instead of grade A/B/C","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"business_network.OrganizationProfile":{"description":"Contains miscellaneous data about an organization, including timezone.","type":"object","title":"business_network.OrganizationProfile","properties":{"customization":{"description":"UX/branding customization overrides for this org.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OrganizationCustomization"}]},"email_options":{"description":"**Beta — unstable surface.** General outbound-email options; carries the org's sender\nselection. See [`EmailOptions`].","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.EmailOptions"}]},"logo_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"off_network_email_options":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OffNetworkEmailOptions"}]},"timezone":{"description":"A timezone definition (IANA), like \"Pacific/Auckland\" or \"Europe/London\".","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"uvdb_region_id":{"description":"UVDB vehicle region identifier (e.g. UREG35=UK/EU, UREG50=Finland, UREG32=NZ)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_network.OrganizationStatus":{"oneOf":[{"const":"unverified"},{"const":"verified"},{"const":"unclaimed","description":"The org this entity represents is not using this account / unaware of this entity.\nThis can happen when the entity is created for representation but not as an accessible account.\n(E.g. off-network suppliers who have no commercial relationship with us but makes sense to be represented in BNA as a node)."}]},"business_network.PaymentTerm":{"oneOf":[{"type":"object","title":"capricorn","required":["type"],"properties":{"type":{"const":"capricorn"}}},{"type":"object","title":"blackfern","required":["type"],"properties":{"type":{"const":"blackfern"}}},{"type":"object","title":"cash","required":["type"],"properties":{"type":{"const":"cash"}}},{"type":"object","title":"card","required":["type"],"properties":{"type":{"const":"card"}}},{"type":"object","title":"other","required":["type","value"],"properties":{"type":{"const":"other"},"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"business_network.Permission":{"description":"Represents a permission associated with a group.\nFrom the auth layer point of view the `scope` and `entity` are just text labels.","type":"object","title":"business_network.Permission","required":["scope"],"properties":{"entity":{"description":"The entity or resource the permission applies to (e.g., `site_id`, `organization_id`, `repairer_business_id`).\n\nIf entity is empty it means that this permission applies to all entities","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"scope":{"description":"The scope of the permission (e.g., `job_viewers`, `order_approvers`).","$ref":"#/components/schemas/std.string.String"}}},"business_network.PrivateOrganizationProfile":{"description":"Organization fields visible only to members of that organization and to\nPartly staff. `status` in particular tells the reader whether an\norganization is unverified or unclaimed, and `contact` / `profile` carry\nthe organization's own configuration.","type":"object","title":"business_network.PrivateOrganizationProfile","required":["contact","created_at","is_test_organization","sso_required","status","updated_at"],"properties":{"contact":{"$ref":"#/components/schemas/business_network.OrganizationContact"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"customization":{"description":"**Beta — unstable surface.** Per-org UX flags. See\n[`OrganizationCustomization`].","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OrganizationCustomization"}]},"email_options":{"description":"**Beta — unstable surface.** General outbound-email options; carries the\norg's sender selection. See [`EmailOptions`].","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.EmailOptions"}]},"is_test_organization":{"$ref":"#/components/schemas/bool"},"off_network_email_options":{"description":"Off-network email options","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.OffNetworkEmailOptions"}]},"sso_required":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"status":{"$ref":"#/components/schemas/business_network.OrganizationStatus"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"uvdb_region_id":{"description":"UVDB vehicle region derived from `country_code`. Retained for frontends that\nhave not yet migrated to reading the country code;\n\nRemove on 28th September 2026","deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_network.PublicBusiness":{"type":"object","title":"business_network.PublicBusiness","required":["id","name","organization_id","organization_name","organization_status","profile"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_name":{"$ref":"#/components/schemas/std.string.String"},"organization_status":{"$ref":"#/components/schemas/business_network.OrganizationStatus"},"profile":{"$ref":"#/components/schemas/business_network.PublicBusinessProfile"}}},"business_network.PublicBusinessProfile":{"oneOf":[{"type":"object","title":"supplier","required":["store_addresses","supply","type"],"properties":{"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"store_addresses":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.SupplierStoreAddress"}}]},"supply":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Value set type","type":"array","items":{"$ref":"#/components/schemas/business_network.SupplyType"},"uniqueItems":true}}]},"trading_terms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierTradingTerms"}]},"type":{"const":"supplier"}}},{"type":"object","title":"repairer","required":["preferences","type"],"properties":{"preferences":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.RepairerPreferences"}]},"type":{"const":"repairer"}}},{"type":"object","title":"repairer_site","required":["shipping_address","type"],"properties":{"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/Address"}]},"type":{"const":"repairer_site"}}},{"type":"object","title":"insurer","required":["type"],"properties":{"available_contracts":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"type":{"const":"insurer"}}}]},"business_network.PublicOrganizationProfile":{"description":"Organization fields safe to expose on a cross-organization surface, such\nas `organizations.search-v2`. Serves directly as the API payload.","type":"object","title":"business_network.PublicOrganizationProfile","required":["country_code","currency_code","id","name"],"properties":{"country_code":{"description":"ISO 3166-1 alpha-3 country code (`accounts.organizations.country_code`,\n`varchar(3) NOT NULL`).","$ref":"#/components/schemas/iso_country.CountryCode"},"currency_code":{"description":"ISO-4217 currency code (`accounts.organizations.currency_code`,\n`varchar(3) NOT NULL`).","$ref":"#/components/schemas/iso_currency.CurrencyCode"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"logo_url":{"description":"Absolute URL to the org's logo image. Stored inside the `profile` jsonb\ncolumn but public by policy, so it is lifted onto this half on read.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"timezone":{"description":"A timezone definition (IANA), like \"Pacific/Auckland\" or \"Europe/London\".\nLifted from the `profile` blob alongside `logo_url`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_network.QuickNote":{"type":"object","title":"business_network.QuickNote","required":["label","text"],"properties":{"label":{"$ref":"#/components/schemas/std.string.String"},"text":{"$ref":"#/components/schemas/std.string.String"}}},"business_network.Repairer":{"type":"object","title":"business_network.Repairer","properties":{"disable_procurement_emails":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"preferences":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.RepairerPreferences"}]}}},"business_network.RepairerOfferCollectionDefaults":{"type":"object","title":"business_network.RepairerOfferCollectionDefaults","required":["stopping_conditions"],"properties":{"stopping_conditions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.RepairerOfferCollectionStoppingCondition"}}}},"business_network.RepairerOfferCollectionStoppingCondition":{"oneOf":[{"type":"object","title":"basket_count","required":["kind","min_baskets"],"properties":{"kind":{"const":"basket_count"},"min_baskets":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"time_elapsed","required":["kind","max_seconds"],"properties":{"kind":{"const":"time_elapsed"},"max_seconds":{"$ref":"#/components/schemas/u64"}}}]},"business_network.RepairerPreferences":{"type":"object","title":"business_network.RepairerPreferences","properties":{"hide_fallback":{"description":"Collapse fallback (and off-network) behind a \"see more\" reveal.\nWhen absent or false, all dealers are shown up front.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"job_sensitivity":{"description":"Whether to prioritize delivery speed over cost. Set on the repairer site\nwhen it differs from the repairer; absent means \"inherit\".","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.JobSensitivity"}]},"offer_collection_defaults":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.RepairerOfferCollectionDefaults"}]},"quick_notes":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.QuickNote"}}]}}},"business_network.RepairerSite":{"type":"object","title":"business_network.RepairerSite","properties":{"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"preferences":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.RepairerPreferences"}]},"shipping_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/Address"}]}}},"business_network.StatusFilter":{"oneOf":[{"const":"unresolved"},{"const":"resolved"},{"const":"ignored"}]},"business_network.Supplier":{"description":"Supplier configuration.\n\nThis struct is used for both input and output via the API and supports\npartial updates through optional fields.","type":"object","title":"business_network.Supplier","properties":{"business_phone":{"description":"Business contact phone number.\n\nWhen omitted or explicitly undefined, the value is not changed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oms_emails":{"description":"List of email addresses used by the Order Management System (OMS).\n\nWhen omitted or explicitly undefined, the value is not changed.\nWhen provided, it replaces the previously stored list.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"store_addresses":{"description":"Store addresses associated with the supplier.\n\nUpdate semantics:\n- If `None`, store addresses are **not modified** in the database.\n- If `Some(Vec<...>)`, the vector is treated as the **complete desired state**\nof all store addresses for the supplier.\n\nResolution and synchronization rules:\n- Addresses are matched by **store address ID (UUID)**.\n- If an entry has no ID, a new address is created with a generated UUID.\n- If an address with the same ID exists in the database, its fields are updated.\n- If no address with the given ID exists, a new address entity is created.\n- Any existing database addresses **not present** in the provided vector\nare treated as removed and **will be deleted**.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.SupplierStoreAddress"}}]},"supply":{"description":"Supply configuration per manufacturer.\n\nThe map key is a manufacturer SUID, and the value is the set of supply types\nsupported by this supplier for that manufacturer.\n\nIf `None`, the supply configuration is not changed.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Value set type","type":"array","items":{"$ref":"#/components/schemas/business_network.SupplyType"},"uniqueItems":true}}]},"trading_terms":{"description":"Supplier-published trading terms shown to repairers (e.g. in the\nchoose-supply flow). Belongs to the supplier, not repairer-specific.\n\nWhen omitted or explicitly undefined, the value is not changed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierTradingTerms"}]}}},"business_network.SupplierOrderCreation":{"oneOf":[{"description":"Supplier can create orders on behalf of the repairer","type":"object","title":"allowed","required":["type"],"properties":{"type":{"const":"allowed"}}}]},"business_network.SupplierOrderEditing":{"oneOf":[{"description":"Supplier can edit orders on behalf of the repairer","type":"object","title":"allowed","required":["type"],"properties":{"type":{"const":"allowed"}}}]},"business_network.SupplierProcurementPreferences":{"type":"object","title":"business_network.SupplierProcurementPreferences","properties":{"order_creation":{"description":"Whether the supplier can create orders on\nbehalf of the buyer (repairer).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierOrderCreation"}]},"order_editing":{"description":"Whether the supplier can edit orders on\nbehalf of the buyer (repairer).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierOrderEditing"}]}}},"business_network.SupplierStoreAddress":{"description":"Represents a store address for a supplier.","type":"object","title":"business_network.SupplierStoreAddress","properties":{"address":{"description":"The full postal address of the supplier store.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/Address"}]},"display_name":{"description":"Repairer-facing name for this address.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"description":"The store address ID.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"name":{"description":"The store address name.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"region":{"description":"The region where the supplier address is located.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"subregion":{"description":"The subregion or district of the supplier address.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_network.SupplierTradingTerms":{"description":"Trading terms a supplier publishes to repairers, shown in the choose-supply flow.\n\nStructured `payment_methods` drive consistent per-value UI chips and analysis.","type":"object","title":"business_network.SupplierTradingTerms","properties":{"payment_methods":{"description":"Payment terms the supplier accepts (e.g. Capricorn, cash, card).","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.PaymentTerm"}}]}}},"business_network.SupplierWorkProviderAccess":{"oneOf":[{"const":"allow"},{"const":"disallow"}]},"business_network.SupplyType":{"oneOf":[{"type":"object","title":"oem","required":["authorized","type"],"properties":{"authorized":{"$ref":"#/components/schemas/bool"},"type":{"const":"oem"}}},{"type":"object","title":"oes","required":["type"],"properties":{"type":{"const":"oes"}}},{"type":"object","title":"aftermarket","required":["type"],"properties":{"type":{"const":"aftermarket"}}},{"type":"object","title":"used","required":["type"],"properties":{"type":{"const":"used"}}}]},"business_network.Tag":{"type":"object","title":"business_network.Tag","required":["country","id"],"properties":{"country":{"$ref":"#/components/schemas/iso_country.CountryCode"},"id":{"$ref":"#/components/schemas/std.string.String"}}},"business_network.TagConnection":{"type":"object","title":"business_network.TagConnection","required":["source","target","violation_code"],"properties":{"source":{"$ref":"#/components/schemas/business_network.Tag"},"target":{"$ref":"#/components/schemas/business_network.Tag"},"violation_code":{"$ref":"#/components/schemas/std.string.String"}}},"business_network.UserInvitationStatus":{"oneOf":[{"const":"pending"},{"const":"expired"},{"const":"confirmed"}]},"business_rules.AutomatedOfferRequestRationale":{"oneOf":[{"const":"matched_job_parts"},{"const":"preferred_supplier"},{"const":"donor_yard_vehicle_match"}]},"business_rules.AutomatedOfferVehicleContext":{"type":"object","title":"business_rules.AutomatedOfferVehicleContext","required":["age_months","make","model"],"properties":{"age_months":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"make":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.AutomatedOfferVehicleMake"}]},"model":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.AutomatedOfferVehicleModel"}]}}},"business_rules.AutomatedOfferVehicleMake":{"type":"object","title":"business_rules.AutomatedOfferVehicleMake","required":["make_suid"],"properties":{"make_suid":{"$ref":"#/components/schemas/std.string.String"}}},"business_rules.AutomatedOfferVehicleModel":{"type":"object","title":"business_rules.AutomatedOfferVehicleModel","required":["model_suid"],"properties":{"model_suid":{"$ref":"#/components/schemas/std.string.String"}}},"business_rules.BusinessRule":{"description":"A persisted entity representing a business relation between two or more businesses","type":"object","title":"business_rules.BusinessRule","required":["id","kind","name","organization_id","priority","source_businesses","targets"],"properties":{"id":{"description":"The ID of the rule","$ref":"#/components/schemas/uuid.Uuid"},"kind":{"description":"Determines the type of relation held between the business entities","$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"description":"An optional name for the rule","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"description":"The organization which is the source of the rule","$ref":"#/components/schemas/uuid.Uuid"},"priority":{"description":"In the case that multiple rules exist, a higher priority implies higher execution priority (Default is 0).","$ref":"#/components/schemas/i32"},"source_businesses":{"description":"Providing an empty source list implies that all the businesses within the organization\ncan be considered as a source","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"targets":{"description":"The list of organizations / businesses that can be considered as targets for the rule","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},"business_rules.BusinessRuleOutput":{"oneOf":[{"description":"Unit type","type":"object","required":["type"],"properties":{"type":{"const":"repairer_work_provider"}}},{"type":"object","title":"business_rules.output.RepairerApprovedSupplierOutput","required":["show_work_provider","type"],"properties":{"show_work_provider":{"$ref":"#/components/schemas/business_network.SupplierWorkProviderAccess"},"supplier_procurement":{"description":"Controls for what a supplier can do on behalf of a repairer\nwhen it comes to procurement.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierProcurementPreferences"}]},"type":{"const":"repairer_approved_supplier"}}},{"oneOf":[{"type":"object","title":"business_rules.OfferRuleEvaluation","required":["outcome","reason","type"],"properties":{"outcome":{"$ref":"#/components/schemas/business_rules.OfferRuleDecision"},"reason":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"work_provider_offer_rule"}}},{"type":"object","title":"business_rules.OfferRuleEvaluationError","required":["error","type"],"properties":{"error":{"$ref":"#/components/schemas/business_rules.OfferRuleError"},"type":{"const":"work_provider_offer_rule"}}}]},{"oneOf":[{"type":"object","title":"business_rules.OfferRuleEvaluation","required":["outcome","reason","type"],"properties":{"outcome":{"$ref":"#/components/schemas/business_rules.OfferRuleDecision"},"reason":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"site_offer_rule"}}},{"type":"object","title":"business_rules.OfferRuleEvaluationError","required":["error","type"],"properties":{"error":{"$ref":"#/components/schemas/business_rules.OfferRuleError"},"type":{"const":"site_offer_rule"}}}]},{"type":"object","title":"business_rules.SupplierAutomatedOfferRepairerOutput","required":["outcome","reason","type"],"properties":{"outcome":{"$ref":"#/components/schemas/bool"},"reason":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"supplier_automated_offer_repairer"}}},{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.ContactMedium"}]},{"type":"object","title":"business_rules.ContactPointOutput","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["type"],"properties":{"type":{"const":"contact_point"}}}]},{"type":"object","title":"business_rules.RepairerBasketBuilderOutput","required":["pipelines","type"],"properties":{"pipelines":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"description":"the array of stages acts as an priority ordered list. evaluation is stopped after the first\nsuccessful stage","type":"object","title":"waterfall<basket_builder_offer.Preference, basket_builder.Filter>","required":["rank","stages","type"],"properties":{"rank":{"$ref":"#/components/schemas/basket_builder.Rank"},"stages":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Stage<basket_builder_offer.Preference, basket_builder.Filter>","required":["algorithm","partition","strategy"],"properties":{"algorithm":{"oneOf":[{"description":"offers are scored using a weighted sum of their scores against each criterion, and the\noffer with the best score is selected.","type":"object","title":"weighted<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder_offer.WeightedCriterion<basket_builder_offer.Preference>","required":["criterion","weight"],"properties":{"criterion":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]},"weight":{"$ref":"#/components/schemas/std.string.String"}}}},"type":{"const":"weighted"}}},{"description":"offers are compared against each other using each criterion in priority order, and the\noffer that wins the most important criterion is selected. if there is a tie, the\nnext criterion is used as a tiebreaker, and so on.","type":"object","title":"lexicographic<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]}},"type":{"const":"lexicographic"}}}]},"partition":{"$ref":"#/components/schemas/basket_builder.Partition"},"strategy":{"oneOf":[{"description":"each step is inclusive of the offers from the previous steps.","type":"object","title":"cascade<basket_builder.Filter>","required":["steps","type"],"properties":{"steps":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Step<basket_builder.Filter>","properties":{"filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/basket_builder.Filter"}]}}}},"type":{"const":"cascade"}}}]}}}},"type":{"const":"waterfall"}}}]}},"type":{"const":"repairer_basket_builder"}}},{"type":"object","title":"business_rules.RepairerPreferredSupplierByMakeOutput","required":["type"],"properties":{"type":{"const":"repairer_preferred_supplier_by_make"}}},{"type":"object","title":"business_rules.ResearchedSupplierOutput","required":["type"],"properties":{"type":{"const":"researched_supplier"}}}]},"business_rules.ContactMedium":{"oneOf":[{"type":"object","title":"business_rules.EmailMedium","required":["emails","medium"],"properties":{"emails":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"medium":{"const":"email"}}}]},"business_rules.ContactPointContext":{"allOf":[{"$ref":"#/components/schemas/business_rules.ContactPointEvent"},{"type":"object","title":"business_rules.ContactPointContext","properties":{}}]},"business_rules.ContactPointEvent":{"oneOf":[{"type":"object","title":"business_rules.OffNetworkOfferRequestContext","required":["contact_point_event","vehicle"],"properties":{"contact_point_event":{"const":"off_network_offer_request"},"vehicle":{"$ref":"#/components/schemas/business_rules.ContactPointVehicleContext"}}}]},"business_rules.ContactPointOutput":{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.ContactMedium"}]},{"type":"object","title":"business_rules.ContactPointOutput","properties":{}}]},"business_rules.ContactPointVehicleContext":{"type":"object","title":"business_rules.ContactPointVehicleContext","properties":{"brand_suid":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"make_suid":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_rules.EmailMedium":{"type":"object","title":"business_rules.EmailMedium","required":["emails"],"properties":{"emails":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"business_rules.EvaluationError":{"oneOf":[{"type":"object","title":"invalid_context","required":["kind"],"properties":{"kind":{"const":"invalid_context"}}},{"type":"object","title":"incorrect_return_count","required":["count","kind"],"properties":{"count":{"$ref":"#/components/schemas/usize"},"kind":{"const":"incorrect_return_count"}}},{"type":"object","title":"preconditions_not_met","required":["kind"],"properties":{"kind":{"const":"preconditions_not_met"}}},{"type":"object","title":"runtime_error","required":["kind","message"],"properties":{"kind":{"const":"runtime_error"},"message":{"$ref":"#/components/schemas/std.string.String"}}}]},"business_rules.NewSupplyType":{"oneOf":[{"type":"object","title":"genuine","required":["supply_type"],"properties":{"supply_type":{"const":"genuine"}}},{"type":"object","title":"aftermarket","required":["is_independent_certified","is_oes","supply_type"],"properties":{"is_independent_certified":{"$ref":"#/components/schemas/bool"},"is_oes":{"$ref":"#/components/schemas/bool"},"supply_type":{"const":"aftermarket"}}},{"type":"object","title":"performance_custom","required":["supply_type"],"properties":{"supply_type":{"const":"performance_custom"}}}]},"business_rules.OffNetworkOfferRequestContext":{"type":"object","title":"business_rules.OffNetworkOfferRequestContext","required":["vehicle"],"properties":{"vehicle":{"$ref":"#/components/schemas/business_rules.ContactPointVehicleContext"}}},"business_rules.OfferRuleDecision":{"oneOf":[{"const":"ALLOW"},{"const":"DISALLOW"}]},"business_rules.OfferRuleError":{"oneOf":[{"const":"unknown_work_provider"},{"const":"missing_vehicle_registration_date"},{"const":"missing_hca"},{"const":"unexpected_error"}]},"business_rules.OfferRuleEvaluation":{"type":"object","title":"business_rules.OfferRuleEvaluation","required":["outcome","reason"],"properties":{"outcome":{"$ref":"#/components/schemas/business_rules.OfferRuleDecision"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"business_rules.OfferRuleEvaluationError":{"type":"object","title":"business_rules.OfferRuleEvaluationError","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/business_rules.OfferRuleError"}}},"business_rules.OfferRuleOutput":{"oneOf":[{"$ref":"#/components/schemas/business_rules.OfferRuleEvaluation"},{"$ref":"#/components/schemas/business_rules.OfferRuleEvaluationError"}]},"business_rules.PartInfo":{"type":"object","title":"business_rules.PartInfo","required":["hca_id","supply_business_id","supply_type"],"properties":{"hca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"supply_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supply_type":{"$ref":"#/components/schemas/business_rules.SupplyType"}}},"business_rules.RecycledSupplyType":{"oneOf":[{"type":"object","title":"grade0","required":["supply_type"],"properties":{"supply_type":{"const":"grade0"}}},{"type":"object","title":"grade_a","required":["supply_type"],"properties":{"supply_type":{"const":"grade_a"}}},{"type":"object","title":"grade_b","required":["supply_type"],"properties":{"supply_type":{"const":"grade_b"}}},{"type":"object","title":"grade_c","required":["supply_type"],"properties":{"supply_type":{"const":"grade_c"}}},{"type":"object","title":"remanufactured","required":["supply_type"],"properties":{"supply_type":{"const":"remanufactured"}}}]},"business_rules.RepairerBasketBuilderContext":{"type":"object","title":"business_rules.RepairerBasketBuilderContext","required":["vehicle"],"properties":{"vehicle":{"$ref":"#/components/schemas/business_rules.RepairerBasketBuilderVehicleContext"}}},"business_rules.RepairerBasketBuilderOutput":{"type":"object","title":"business_rules.RepairerBasketBuilderOutput","required":["pipelines"],"properties":{"pipelines":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"description":"the array of stages acts as an priority ordered list. evaluation is stopped after the first\nsuccessful stage","type":"object","title":"waterfall<basket_builder_offer.Preference, basket_builder.Filter>","required":["rank","stages","type"],"properties":{"rank":{"$ref":"#/components/schemas/basket_builder.Rank"},"stages":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Stage<basket_builder_offer.Preference, basket_builder.Filter>","required":["algorithm","partition","strategy"],"properties":{"algorithm":{"oneOf":[{"description":"offers are scored using a weighted sum of their scores against each criterion, and the\noffer with the best score is selected.","type":"object","title":"weighted<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder_offer.WeightedCriterion<basket_builder_offer.Preference>","required":["criterion","weight"],"properties":{"criterion":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]},"weight":{"$ref":"#/components/schemas/std.string.String"}}}},"type":{"const":"weighted"}}},{"description":"offers are compared against each other using each criterion in priority order, and the\noffer that wins the most important criterion is selected. if there is a tie, the\nnext criterion is used as a tiebreaker, and so on.","type":"object","title":"lexicographic<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]}},"type":{"const":"lexicographic"}}}]},"partition":{"$ref":"#/components/schemas/basket_builder.Partition"},"strategy":{"oneOf":[{"description":"each step is inclusive of the offers from the previous steps.","type":"object","title":"cascade<basket_builder.Filter>","required":["steps","type"],"properties":{"steps":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Step<basket_builder.Filter>","properties":{"filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/basket_builder.Filter"}]}}}},"type":{"const":"cascade"}}}]}}}},"type":{"const":"waterfall"}}}]}}}},"business_rules.RepairerBasketBuilderVehicleContext":{"type":"object","title":"business_rules.RepairerBasketBuilderVehicleContext","properties":{"age_months":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"make_suid":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"business_rules.RepairerPreferredSupplierByMakeContext":{"type":"object","title":"business_rules.RepairerPreferredSupplierByMakeContext","required":["make_suid"],"properties":{"make_suid":{"description":"The make of the vehicle being repaired, as a UVDB Make SUID (UMAK format).","$ref":"#/components/schemas/std.string.String"}}},"business_rules.RepairerPreferredSupplierByMakeOutput":{"type":"object","title":"business_rules.RepairerPreferredSupplierByMakeOutput","properties":{}},"business_rules.RepairerPreferredSupplierByMakeSchema":{"oneOf":[{"type":"object","title":"v1","required":["v1"],"properties":{"v1":{"$ref":"#/components/schemas/business_rules.RepairerPreferredSupplierByMakeSchemaV1"}}}]},"business_rules.RepairerPreferredSupplierByMakeSchemaV1":{"type":"object","title":"business_rules.RepairerPreferredSupplierByMakeSchemaV1","required":["makes"],"properties":{"makes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"business_rules.ResearchedSupplierContext":{"description":"The brand being validated, used to decide whether a supplier should be used.","type":"object","title":"business_rules.ResearchedSupplierContext","required":["brand"],"properties":{"brand":{"$ref":"#/components/schemas/std.string.String"}}},"business_rules.ResearchedSupplierOutput":{"type":"object","title":"business_rules.ResearchedSupplierOutput","properties":{}},"business_rules.RuleContext":{"oneOf":[{"description":"Unit type","type":"object","required":["type"],"properties":{"type":{"const":"repairer_work_provider"}}},{"description":"Unit type","type":"object","required":["type"],"properties":{"type":{"const":"repairer_approved_supplier"}}},{"type":"object","title":"business_rules.WorkProviderOfferRuleInput","required":["part","type","vehicle"],"properties":{"part":{"$ref":"#/components/schemas/business_rules.PartInfo"},"type":{"const":"work_provider_offer_rule"},"vehicle":{"$ref":"#/components/schemas/business_rules.VehicleContext"}}},{"type":"object","title":"business_rules.SiteOfferRuleInput","required":["part","site","type","vehicle"],"properties":{"part":{"$ref":"#/components/schemas/business_rules.PartInfo"},"site":{"$ref":"#/components/schemas/business_rules.SiteContext"},"type":{"const":"site_offer_rule"},"vehicle":{"$ref":"#/components/schemas/business_rules.VehicleContext"}}},{"type":"object","title":"business_rules.SupplierAutomatedOfferRepairerContext","required":["recommendation_reason","supplied_makes","type","vehicle"],"properties":{"recommendation_reason":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.AutomatedOfferRequestRationale"}},"supplied_makes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"type":{"const":"supplier_automated_offer_repairer"},"vehicle":{"$ref":"#/components/schemas/business_rules.AutomatedOfferVehicleContext"}}},{"allOf":[{"$ref":"#/components/schemas/business_rules.ContactPointEvent"},{"type":"object","title":"business_rules.ContactPointContext","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["type"],"properties":{"type":{"const":"contact_point"}}}]},{"type":"object","title":"business_rules.RepairerBasketBuilderContext","required":["type","vehicle"],"properties":{"type":{"const":"repairer_basket_builder"},"vehicle":{"$ref":"#/components/schemas/business_rules.RepairerBasketBuilderVehicleContext"}}},{"type":"object","title":"business_rules.RepairerPreferredSupplierByMakeContext","required":["make_suid","type"],"properties":{"make_suid":{"description":"The make of the vehicle being repaired, as a UVDB Make SUID (UMAK format).","$ref":"#/components/schemas/std.string.String"},"type":{"const":"repairer_preferred_supplier_by_make"}}},{"description":"The brand being validated, used to decide whether a supplier should be used.","type":"object","title":"business_rules.ResearchedSupplierContext","required":["brand","type"],"properties":{"brand":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"researched_supplier"}}}]},"business_rules.RuleKind":{"oneOf":[{"const":"repairer_work_provider"},{"const":"repairer_approved_supplier"},{"const":"work_provider_offer_rule"},{"const":"site_offer_rule"},{"const":"supplier_automated_offer_repairer"},{"const":"contact_point"},{"const":"repairer_basket_builder"},{"const":"repairer_preferred_supplier_by_make"},{"const":"researched_supplier"}]},"business_rules.RuleSchemaValidationError":{"oneOf":[{"type":"object","title":"legacy_decision_model_error","required":["legacy_decision_model_error"],"properties":{"legacy_decision_model_error":{"$ref":"#/components/schemas/rules_engine_rs_v2.ValidationError"}}}]},"business_rules.RuleValidationError":{"oneOf":[{"const":"rule_targets_is_empty","description":"This rule requires at least one target"},{"const":"org_only_rule","description":"This rule is only applicable between organizations, not businesses"},{"const":"target_business_required","description":"This rule requires all targets to specify a business_id"},{"const":"target_business_forbidden","description":"This rule is scoped to target organizations, so no target may specify a business_id"},{"const":"source_businesses_required","description":"This rule requires that you have business level specificty on the source"}]},"business_rules.SiteContext":{"type":"object","title":"business_rules.SiteContext","required":["site_id"],"properties":{"site_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"business_rules.SiteOfferRuleInput":{"type":"object","title":"business_rules.SiteOfferRuleInput","required":["part","site","vehicle"],"properties":{"part":{"$ref":"#/components/schemas/business_rules.PartInfo"},"site":{"$ref":"#/components/schemas/business_rules.SiteContext"},"vehicle":{"$ref":"#/components/schemas/business_rules.VehicleContext"}}},"business_rules.SupplierAutomatedOfferRepairerContext":{"type":"object","title":"business_rules.SupplierAutomatedOfferRepairerContext","required":["recommendation_reason","supplied_makes","vehicle"],"properties":{"recommendation_reason":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.AutomatedOfferRequestRationale"}},"supplied_makes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"vehicle":{"$ref":"#/components/schemas/business_rules.AutomatedOfferVehicleContext"}}},"business_rules.SupplierAutomatedOfferRepairerOutput":{"type":"object","title":"business_rules.SupplierAutomatedOfferRepairerOutput","required":["outcome","reason"],"properties":{"outcome":{"$ref":"#/components/schemas/bool"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"business_rules.SupplyType":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/business_rules.NewSupplyType"},{"type":"object","title":"new","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["type"],"properties":{"type":{"const":"new"}}}]},{"allOf":[{"$ref":"#/components/schemas/business_rules.RecycledSupplyType"},{"type":"object","title":"recycled","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["type"],"properties":{"type":{"const":"recycled"}}}]}]},"business_rules.VehicleContext":{"type":"object","title":"business_rules.VehicleContext","required":["age_months","make"],"properties":{"age_months":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"make":{"$ref":"#/components/schemas/business_rules.VehicleMake"}}},"business_rules.VehicleMake":{"type":"object","title":"business_rules.VehicleMake","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}},"business_rules.WorkProviderOfferRuleInput":{"type":"object","title":"business_rules.WorkProviderOfferRuleInput","required":["part","vehicle"],"properties":{"part":{"$ref":"#/components/schemas/business_rules.PartInfo"},"vehicle":{"$ref":"#/components/schemas/business_rules.VehicleContext"}}},"business_rules.input.ContactPointSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.input.LegacyDecisionModelDTO<business_rules.ContactPointContext, business_rules.ContactPointOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.input.Policy<business_rules.ContactPointContext, business_rules.ContactPointOutput>","required":["rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.input.Rule"}}}}}}}}]},"business_rules.input.RepairerApprovedSupplierOutput":{"type":"object","title":"business_rules.input.RepairerApprovedSupplierOutput","properties":{"show_work_provider":{"$ref":"#/components/schemas/business_network.SupplierWorkProviderAccess"},"supplier_procurement":{"description":"Controls for what a supplier can do on behalf of a repairer\nwhen it comes to procurement.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierProcurementPreferences"}]}}},"business_rules.input.RepairerApprovedSupplierSchema":{"oneOf":[{"const":"default"},{"type":"object","title":"output","required":["output"],"properties":{"output":{"$ref":"#/components/schemas/business_rules.input.RepairerApprovedSupplierOutput"}}},{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.input.LegacyDecisionModelDTO<std.tuple.Tuple0, business_rules.input.RepairerApprovedSupplierOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.input.Policy<std.tuple.Tuple0, business_rules.input.RepairerApprovedSupplierOutput>","required":["rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.input.Rule"}}}}}}}}]},"business_rules.input.RepairerBasketBuilderSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.input.LegacyDecisionModelDTO<business_rules.RepairerBasketBuilderContext, business_rules.RepairerBasketBuilderOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.input.Policy<business_rules.RepairerBasketBuilderContext, business_rules.RepairerBasketBuilderOutput>","required":["rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.input.Rule"}}}}}}}}]},"business_rules.input.RepairerWorkProviderSchema":{"oneOf":[{"const":"default"},{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.input.LegacyDecisionModelDTO<std.tuple.Tuple0, std.tuple.Tuple0>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.input.Policy<std.tuple.Tuple0, std.tuple.Tuple0>","required":["rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.input.Rule"}}}}}}}}]},"business_rules.input.ResearchedSupplierSchema":{"oneOf":[{"type":"object","title":"v1","required":["v1"],"properties":{"v1":{"$ref":"#/components/schemas/business_rules.input.ResearchedSupplierSchemaV1"}}}]},"business_rules.input.ResearchedSupplierSchemaV1":{"type":"object","title":"business_rules.input.ResearchedSupplierSchemaV1","properties":{"brands":{"description":"Brands this supplier is trusted for. `None` => all brands.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]}}},"business_rules.input.RuleSchema":{"oneOf":[{"type":"object","title":"repairer_preferred_supplier_by_make","required":["repairer_preferred_supplier_by_make"],"properties":{"repairer_preferred_supplier_by_make":{"$ref":"#/components/schemas/business_rules.RepairerPreferredSupplierByMakeSchema"}}},{"type":"object","title":"repairer_work_provider","required":["repairer_work_provider"],"properties":{"repairer_work_provider":{"$ref":"#/components/schemas/business_rules.input.RepairerWorkProviderSchema"}}},{"type":"object","title":"repairer_approved_supplier","required":["repairer_approved_supplier"],"properties":{"repairer_approved_supplier":{"$ref":"#/components/schemas/business_rules.input.RepairerApprovedSupplierSchema"}}},{"type":"object","title":"work_provider_offer_rule","required":["work_provider_offer_rule"],"properties":{"work_provider_offer_rule":{"$ref":"#/components/schemas/business_rules.input.WorkProviderOfferRuleSchema"}}},{"type":"object","title":"site_offer_rule","required":["site_offer_rule"],"properties":{"site_offer_rule":{"$ref":"#/components/schemas/business_rules.input.SiteOfferRuleSchema"}}},{"type":"object","title":"supplier_automated_offer_repairer","required":["supplier_automated_offer_repairer"],"properties":{"supplier_automated_offer_repairer":{"$ref":"#/components/schemas/business_rules.input.SupplierAutomatedOfferRepairerSchema"}}},{"type":"object","title":"contact_point","required":["contact_point"],"properties":{"contact_point":{"$ref":"#/components/schemas/business_rules.input.ContactPointSchema"}}},{"type":"object","title":"repairer_basket_builder","required":["repairer_basket_builder"],"properties":{"repairer_basket_builder":{"$ref":"#/components/schemas/business_rules.input.RepairerBasketBuilderSchema"}}},{"type":"object","title":"researched_supplier","required":["researched_supplier"],"properties":{"researched_supplier":{"$ref":"#/components/schemas/business_rules.input.ResearchedSupplierSchema"}}}]},"business_rules.input.RuleTarget":{"type":"object","title":"business_rules.input.RuleTarget","required":["organization_id"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"business_rules.input.SiteOfferRuleSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.input.LegacyDecisionModelDTO<business_rules.SiteOfferRuleInput, business_rules.OfferRuleOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.input.Policy<business_rules.SiteOfferRuleInput, business_rules.OfferRuleOutput>","required":["rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.input.Rule"}}}}}}}}]},"business_rules.input.SupplierAutomatedOfferRepairerSchema":{"oneOf":[{"const":"default"},{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.input.LegacyDecisionModelDTO<business_rules.SupplierAutomatedOfferRepairerContext, business_rules.SupplierAutomatedOfferRepairerOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.input.Policy<business_rules.SupplierAutomatedOfferRepairerContext, business_rules.SupplierAutomatedOfferRepairerOutput>","required":["rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.input.Rule"}}}}}}}}]},"business_rules.input.WorkProviderOfferRuleSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.input.LegacyDecisionModelDTO<business_rules.WorkProviderOfferRuleInput, business_rules.OfferRuleOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.input.Policy<business_rules.WorkProviderOfferRuleInput, business_rules.OfferRuleOutput>","required":["rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.input.Rule"}}}}}}}}]},"business_rules.output.ContactPointSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.output.LegacyDecisionModelDTO<business_rules.ContactPointContext, business_rules.ContactPointOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.output.Policy<business_rules.ContactPointContext, business_rules.ContactPointOutput>","required":["_context_marker","_output_marker","rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.output.Rule"}}}}}}}}]},"business_rules.output.RepairerApprovedSupplierOutput":{"type":"object","title":"business_rules.output.RepairerApprovedSupplierOutput","required":["show_work_provider"],"properties":{"show_work_provider":{"$ref":"#/components/schemas/business_network.SupplierWorkProviderAccess"},"supplier_procurement":{"description":"Controls for what a supplier can do on behalf of a repairer\nwhen it comes to procurement.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.SupplierProcurementPreferences"}]}}},"business_rules.output.RepairerApprovedSupplierSchema":{"oneOf":[{"const":"default"},{"type":"object","title":"output","required":["output"],"properties":{"output":{"$ref":"#/components/schemas/business_rules.output.RepairerApprovedSupplierOutput"}}},{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.output.LegacyDecisionModelDTO<std.tuple.Tuple0, business_rules.output.RepairerApprovedSupplierOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.output.Policy<std.tuple.Tuple0, business_rules.output.RepairerApprovedSupplierOutput>","required":["_context_marker","_output_marker","rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.output.Rule"}}}}}}}}]},"business_rules.output.RepairerBasketBuilderSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.output.LegacyDecisionModelDTO<business_rules.RepairerBasketBuilderContext, business_rules.RepairerBasketBuilderOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.output.Policy<business_rules.RepairerBasketBuilderContext, business_rules.RepairerBasketBuilderOutput>","required":["_context_marker","_output_marker","rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.output.Rule"}}}}}}}}]},"business_rules.output.RepairerWorkProviderSchema":{"oneOf":[{"const":"default"},{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.output.LegacyDecisionModelDTO<std.tuple.Tuple0, std.tuple.Tuple0>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.output.Policy<std.tuple.Tuple0, std.tuple.Tuple0>","required":["_context_marker","_output_marker","rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.output.Rule"}}}}}}}}]},"business_rules.output.ResearchedSupplierSchema":{"oneOf":[{"type":"object","title":"v1","required":["v1"],"properties":{"v1":{"$ref":"#/components/schemas/business_rules.output.ResearchedSupplierSchemaV1"}}}]},"business_rules.output.ResearchedSupplierSchemaV1":{"type":"object","title":"business_rules.output.ResearchedSupplierSchemaV1","required":["brands"],"properties":{"brands":{"description":"Brands this supplier is trusted for. `None` => all brands.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]}}},"business_rules.output.RuleSchema":{"oneOf":[{"type":"object","title":"repairer_preferred_supplier_by_make","required":["repairer_preferred_supplier_by_make"],"properties":{"repairer_preferred_supplier_by_make":{"$ref":"#/components/schemas/business_rules.RepairerPreferredSupplierByMakeSchema"}}},{"type":"object","title":"repairer_work_provider","required":["repairer_work_provider"],"properties":{"repairer_work_provider":{"$ref":"#/components/schemas/business_rules.output.RepairerWorkProviderSchema"}}},{"type":"object","title":"repairer_approved_supplier","required":["repairer_approved_supplier"],"properties":{"repairer_approved_supplier":{"$ref":"#/components/schemas/business_rules.output.RepairerApprovedSupplierSchema"}}},{"type":"object","title":"work_provider_offer_rule","required":["work_provider_offer_rule"],"properties":{"work_provider_offer_rule":{"$ref":"#/components/schemas/business_rules.output.WorkProviderOfferRuleSchema"}}},{"type":"object","title":"site_offer_rule","required":["site_offer_rule"],"properties":{"site_offer_rule":{"$ref":"#/components/schemas/business_rules.output.SiteOfferRuleSchema"}}},{"type":"object","title":"supplier_automated_offer_repairer","required":["supplier_automated_offer_repairer"],"properties":{"supplier_automated_offer_repairer":{"$ref":"#/components/schemas/business_rules.output.SupplierAutomatedOfferRepairerSchema"}}},{"type":"object","title":"contact_point","required":["contact_point"],"properties":{"contact_point":{"$ref":"#/components/schemas/business_rules.output.ContactPointSchema"}}},{"type":"object","title":"repairer_basket_builder","required":["repairer_basket_builder"],"properties":{"repairer_basket_builder":{"$ref":"#/components/schemas/business_rules.output.RepairerBasketBuilderSchema"}}},{"type":"object","title":"researched_supplier","required":["researched_supplier"],"properties":{"researched_supplier":{"$ref":"#/components/schemas/business_rules.output.ResearchedSupplierSchema"}}}]},"business_rules.output.RuleTarget":{"type":"object","title":"business_rules.output.RuleTarget","required":["business_id","organization_id"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"business_rules.output.SiteOfferRuleSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.output.LegacyDecisionModelDTO<business_rules.SiteOfferRuleInput, business_rules.OfferRuleOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.output.Policy<business_rules.SiteOfferRuleInput, business_rules.OfferRuleOutput>","required":["_context_marker","_output_marker","rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.output.Rule"}}}}}}}}]},"business_rules.output.SupplierAutomatedOfferRepairerSchema":{"oneOf":[{"const":"default"},{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.output.LegacyDecisionModelDTO<business_rules.SupplierAutomatedOfferRepairerContext, business_rules.SupplierAutomatedOfferRepairerOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.output.Policy<business_rules.SupplierAutomatedOfferRepairerContext, business_rules.SupplierAutomatedOfferRepairerOutput>","required":["_context_marker","_output_marker","rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.output.Rule"}}}}}}}}]},"business_rules.output.WorkProviderOfferRuleSchema":{"oneOf":[{"type":"object","title":"model","required":["model"],"properties":{"model":{"type":"object","title":"business_rules.output.LegacyDecisionModelDTO<business_rules.WorkProviderOfferRuleInput, business_rules.OfferRuleOutput>","required":["data"],"properties":{"data":{"description":"A policy that returns the first matching rule's output, or empty if none match.\n\nRules are evaluated in order; the first rule whose preconditions all pass\nproduces the single result.","type":"object","title":"rules_engine_complex_first.output.Policy<business_rules.WorkProviderOfferRuleInput, business_rules.OfferRuleOutput>","required":["_context_marker","_output_marker","rules"],"properties":{"_context_marker":{"description":"Zero-sized phantom data","type":"null"},"_output_marker":{"description":"Zero-sized phantom data","type":"null"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine.output.Rule"}}}}}}}}]},"business_rules_evaluate_v2.BusinessRulesEvaluateError":{"oneOf":[{"const":"invalid_persisted_output"},{"type":"object","title":"model_parse","required":["model_parse"],"properties":{"model_parse":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"incorrect_return_type","required":["incorrect_return_type"],"properties":{"incorrect_return_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"execution","required":["execution"],"properties":{"execution":{"$ref":"#/components/schemas/commerce_rules.PartlyDecisionModelEvaluationError"}}},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"not_found"},{"const":"incorrect_context_provided"},{"const":"forbidden"}]},"business_rules_evaluate_v2.EvaluationMode":{"oneOf":[{"type":"object","title":"id_evaluation","required":["id_evaluation"],"properties":{"id_evaluation":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"bulk_evaluate","required":["bulk_evaluate"],"properties":{"bulk_evaluate":{"$ref":"#/components/schemas/business_rules_list_v2.Filters"}}}]},"business_rules_evaluate_v2.Request":{"type":"object","title":"business_rules_evaluate_v2.Request","required":["context","input"],"properties":{"context":{"$ref":"#/components/schemas/business_rules.RuleContext"},"input":{"$ref":"#/components/schemas/business_rules_evaluate_v2.EvaluationMode"},"subject_organization_id":{"description":"The organization whose rules to evaluate, when it is not the caller's own. Partly staff\nonly; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"business_rules_evaluate_v2.Response":{"type":"object","title":"business_rules_evaluate_v2.Response","required":["items","pagination"],"properties":{"items":{"description":"The list of rules that were evaluated, in priority descending order (numerically descending).","type":"array","items":{"$ref":"#/components/schemas/business_rules_evaluate_v2.RuleEvaluationResult"}},"pagination":{"description":"If using Bulk Evaluate, this holds the next cursor assuming there are more rules to evaluate","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}},"business_rules_evaluate_v2.RuleEvaluation":{"type":"object","title":"business_rules_evaluate_v2.RuleEvaluation","required":["kind","name","output","priority","rule_id","source_businesses","source_organization","targets"],"properties":{"kind":{"$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"output":{"$ref":"#/components/schemas/business_rules.BusinessRuleOutput"},"priority":{"$ref":"#/components/schemas/i32"},"rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source_businesses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"source_organization":{"$ref":"#/components/schemas/uuid.Uuid"},"targets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},"business_rules_evaluate_v2.RuleEvaluationResult":{"oneOf":[{"type":"object","title":"business_rules_evaluate_v2.RuleEvaluation","required":["kind","name","output","priority","rule_id","source_businesses","source_organization","status","targets"],"properties":{"kind":{"$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"output":{"$ref":"#/components/schemas/business_rules.BusinessRuleOutput"},"priority":{"$ref":"#/components/schemas/i32"},"rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source_businesses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"source_organization":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"const":"success"},"targets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},{"type":"object","title":"error","required":["error","kind","name","priority","rule_id","source_businesses","source_organization","status","targets"],"properties":{"error":{"$ref":"#/components/schemas/business_rules.EvaluationError"},"kind":{"$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"priority":{"$ref":"#/components/schemas/i32"},"rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source_businesses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"source_organization":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"const":"error"},"targets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}}]},"business_rules_get.Error":{"oneOf":[{"const":"not_found"},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"business_rules_get_v2.Request":{"type":"object","title":"business_rules_get_v2.Request","required":["id"],"properties":{"id":{"description":"The unique identifier of the rule to retrieve.","$ref":"#/components/schemas/uuid.Uuid"},"subject_organization_id":{"description":"The organization the rule is sourced from, when it is not the caller's own. Partly staff\nonly; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"business_rules_get_v2.Response":{"type":"object","title":"business_rules_get_v2.Response","required":["id","kind","name","organization_id","priority","schema","source_businesses","targets"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"priority":{"$ref":"#/components/schemas/i32"},"schema":{"$ref":"#/components/schemas/business_rules.output.RuleSchema"},"source_businesses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"targets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},"business_rules_insert.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"rule_validation","required":["rule_validation"],"properties":{"rule_validation":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.RuleValidationError"}}}},{"type":"object","title":"rule_schema_validation","required":["rule_schema_validation"],"properties":{"rule_schema_validation":{"$ref":"#/components/schemas/business_rules.RuleSchemaValidationError"}}},{"const":"priority_negative"}]},"business_rules_insert_many.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"rule_validation","required":["rule_validation"],"properties":{"rule_validation":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.RuleValidationError"}}}},{"type":"object","title":"rule_schema_validation","required":["rule_schema_validation"],"properties":{"rule_schema_validation":{"$ref":"#/components/schemas/business_rules.RuleSchemaValidationError"}}},{"const":"priority_negative"},{"type":"object","title":"too_many_rules","required":["too_many_rules"],"properties":{"too_many_rules":{"type":"object","title":"too_many_rules","required":["count","max"],"properties":{"count":{"$ref":"#/components/schemas/usize"},"max":{"$ref":"#/components/schemas/usize"}}}}}]},"business_rules_insert_many.Request":{"type":"object","title":"business_rules_insert_many.Request","required":["rules"],"properties":{"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules_insert_many.RuleSpec"}},"subject_organization_id":{"description":"The organization the rules are sourced from, when it is not the caller's own. Partly\nstaff only; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"business_rules_insert_many.Response":{"type":"object","title":"business_rules_insert_many.Response","required":["rules"],"properties":{"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules_insert_v2.Response"}}}},"business_rules_insert_many.RuleSpec":{"type":"object","title":"business_rules_insert_many.RuleSpec","required":["rule_schema"],"properties":{"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"priority":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"rule_schema":{"$ref":"#/components/schemas/business_rules.input.RuleSchema"},"source_businesses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"targets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}}}},"business_rules_insert_v2.Request":{"type":"object","title":"business_rules_insert_v2.Request","required":["rule_schema"],"properties":{"name":{"description":"An optional name for the rule","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"priority":{"description":"Priority dictates the ordering of the rules being returned by business-rules list.\nA higher numeric priority will be returned first with 0 being the lowest priority.\n\nRules are not guaranteed to respect this priority order","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"rule_schema":{"$ref":"#/components/schemas/business_rules.input.RuleSchema"},"source_businesses":{"description":"The list of businesses within the callers organization which this rule applies to\nAn empty list means that the rule applies to all businesses within the organization","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"subject_organization_id":{"description":"The organization the rule is sourced from, when it is not the caller's own. Partly staff\nonly; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"targets":{"description":"The list of rule targets specifying which organizations/businesses are considered targets for the rule.\nAn empty list of targets implies that the rule applies to every org / business","type":"array","items":{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}}}},"business_rules_insert_v2.Response":{"type":"object","title":"business_rules_insert_v2.Response","required":["id","name","organization_id","priority","schema","source_businesses","targets"],"properties":{"id":{"description":"The ID of the rule","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"An optional name for the rule","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"description":"The organization which is the source of the rule","$ref":"#/components/schemas/uuid.Uuid"},"priority":{"description":"In the case that multiple rules exist, a higher priority implies higher execution priority (Default is 0).\n\nRules are not guaranteed to respect this priority order","$ref":"#/components/schemas/i32"},"schema":{"description":"Determines the type of relation held between the business entities","$ref":"#/components/schemas/business_rules.output.RuleSchema"},"source_businesses":{"description":"A list of filters to determine which businesses under the owning organization\nare considered a source of the relationship.\n\nProviding an empty source list implies that all the businesses within the organization\ncan be considered as a source","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"targets":{"description":"The list of organizations / businesses that can be considered as targets for the rule\nA target may be applied to a single organization and then specifies EntityFilter 's\nto filter which businesses within the provided organization the rule applies to.","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},"business_rules_list.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"business_rules_list_v2.Filters":{"description":"Filters shared by the list endpoint and bulk evaluation.\nAlways sorts by priority descending, supports cursor-based pagination on rule ID.\nWhen no limit is specified, the API defaults to returning at most 1000 items per page.\nUse the `next_cursor` from the response to fetch subsequent pages.","type":"object","title":"business_rules_list_v2.Filters","required":["kind"],"properties":{"kind":{"description":"Filter for which type of rule to return","$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"page":{"description":"Cursor-based pagination over rule IDs.\nWhen no limit is specified, the API defaults to returning at most 1000 items per page.\nUse the `next_cursor` from the response to fetch subsequent pages.","$ref":"#/components/schemas/PageRequest"},"source":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}]},"target":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}]}}},"business_rules_list_v2.Item":{"type":"object","title":"business_rules_list_v2.Item","required":["id","kind","name","organization_id","priority","source_businesses","targets"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"priority":{"$ref":"#/components/schemas/i32"},"source_businesses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"targets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},"business_rules_list_v2.Request":{"description":"API request for listing business rules (V2).","type":"object","title":"business_rules_list_v2.Request","required":["kind"],"properties":{"kind":{"description":"Filter for which type of rule to return","$ref":"#/components/schemas/business_rules.RuleKind"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"page":{"description":"Cursor-based pagination over rule IDs.\nWhen no limit is specified, the API defaults to returning at most 1000 items per page.\nUse the `next_cursor` from the response to fetch subsequent pages.","$ref":"#/components/schemas/PageRequest"},"source":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}]},"subject_organization_id":{"description":"The organization whose rules to list, when it is not the caller's own. Partly staff\nonly; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"target":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}]}}},"business_rules_list_v2.Response":{"type":"object","title":"business_rules_list_v2.Response","required":["items","pagination"],"properties":{"items":{"description":"Rules matching the request filters, sorted by priority descending (numerically descending).","type":"array","items":{"$ref":"#/components/schemas/business_rules_list_v2.Item"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}},"business_rules_remove.Error":{"oneOf":[{"const":"not_found"},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"business_rules_remove.Request":{"type":"object","title":"business_rules_remove.Request","required":["id"],"properties":{"id":{"description":"The unique identifier of the rule to remove.","$ref":"#/components/schemas/uuid.Uuid"},"subject_organization_id":{"description":"The organization the rule is sourced from, when it is not the caller's own. Partly staff\nonly; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"business_rules_remove_many.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_rules","required":["too_many_rules"],"properties":{"too_many_rules":{"type":"object","title":"too_many_rules","required":["count","max"],"properties":{"count":{"$ref":"#/components/schemas/usize"},"max":{"$ref":"#/components/schemas/usize"}}}}}]},"business_rules_remove_many.Request":{"type":"object","title":"business_rules_remove_many.Request","required":["ids"],"properties":{"ids":{"description":"The rules to remove. Ids that do not belong to the subject organization\nare reported in `not_found` rather than failing the call.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"subject_organization_id":{"description":"The organization the rules are sourced from, when it is not the caller's own. Partly\nstaff only; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"business_rules_remove_many.Response":{"type":"object","title":"business_rules_remove_many.Response","required":["not_found","removed"],"properties":{"not_found":{"description":"Ids that matched no rule of the subject organization.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"removed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.BusinessRule"}}}},"business_rules_update.Error":{"oneOf":[{"const":"not_found"},{"type":"object","title":"rule_validation","required":["rule_validation"],"properties":{"rule_validation":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.RuleValidationError"}}}},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"rule_schema_validation","required":["rule_schema_validation"],"properties":{"rule_schema_validation":{"$ref":"#/components/schemas/business_rules.RuleSchemaValidationError"}}},{"type":"object","title":"rule_kind_mismatch","required":["rule_kind_mismatch"],"properties":{"rule_kind_mismatch":{"type":"object","title":"rule_kind_mismatch","required":["persisted","provided"],"properties":{"persisted":{"$ref":"#/components/schemas/business_rules.RuleKind"},"provided":{"$ref":"#/components/schemas/business_rules.RuleKind"}}}}}]},"business_rules_update_v2.Request":{"type":"object","title":"business_rules_update_v2.Request","required":["id","rule_schema"],"properties":{"id":{"description":"The unique identifier of the rule to update.","$ref":"#/components/schemas/uuid.Uuid"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"priority":{"description":"Specifies the priority of a rule, a higher number implies a higher priority (Default is 0)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"rule_schema":{"description":"Replaces the rule body. The schema kind must match the rule's existing kind.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.input.RuleSchema"}]},"source_businesses":{"description":"An empty list means that the rule applies to all businesses within the organization.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"subject_organization_id":{"description":"The organization the rule is sourced from, when it is not the caller's own. Partly staff\nonly; anyone else is forbidden.\n\nResolved into the calling organization by the handler; it never reaches the service.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"targets":{"description":"An empty list of targets implies that the rule applies to every org / business.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}}]}}},"business_rules_update_v2.Response":{"type":"object","title":"business_rules_update_v2.Response","required":["id","name","organization_id","priority","schema","source_businesses","targets"],"properties":{"id":{"description":"The ID of the rule","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"An optional name for the rule","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"description":"The organization which is the source of the rule","$ref":"#/components/schemas/uuid.Uuid"},"priority":{"description":"In the case that multiple rules exist, a higher priority implies higher execution priority (Default is 0).\n\nRules are not guaranteed to respect this priority order","$ref":"#/components/schemas/i32"},"schema":{"description":"The typed schema encoding the rule kind and its decision model","$ref":"#/components/schemas/business_rules.output.RuleSchema"},"source_businesses":{"description":"A list of filters to determine which businesses under the owning organization\nare considered a source of the relationship.\n\nProviding an empty source list implies that all the businesses within the organization\ncan be considered as a source","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"targets":{"description":"The list of organizations / businesses that can be considered as targets for the rule","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},"business_tags_businesses_search.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"},{"type":"object","title":"invalid_tag_id","required":["invalid_tag_id"],"properties":{"invalid_tag_id":{"type":"object","title":"invalid_tag_id","required":["tag"],"properties":{"tag":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"business_tags_businesses_search.Request":{"type":"object","title":"business_tags_businesses_search.Request","required":["tag"],"properties":{"name_contains":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"tag":{"$ref":"#/components/schemas/business_network.Tag"}}},"business_tags_businesses_search.TaggedBusiness":{"type":"object","title":"business_tags_businesses_search.TaggedBusiness","required":["business_id","kind","name","organization_id","organization_name"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/business_tags_businesses_search.TaggedBusinessKind"},"name":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_name":{"$ref":"#/components/schemas/std.string.String"}}},"business_tags_businesses_search.TaggedBusinessKind":{"oneOf":[{"const":"supplier"},{"const":"repairer"},{"const":"repairer_site"},{"const":"insurer"}]},"business_tags_get.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"business_not_found","required":["business_not_found"],"properties":{"business_not_found":{"type":"object","title":"business_not_found","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"business_tags_get.Request":{"type":"object","title":"business_tags_get.Request","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"business_tags_get.Response":{"type":"object","title":"business_tags_get.Response","required":["tags"],"properties":{"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Tag"}}}},"business_tags_search.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"}]},"business_tags_search.Request":{"type":"object","title":"business_tags_search.Request","required":["country"],"properties":{"country":{"$ref":"#/components/schemas/iso_country.CountryCode"},"id_contains":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"}}},"business_tags_update.BusinessTags":{"type":"object","title":"business_tags_update.BusinessTags","required":["business_id","organization_id","tags"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Tag"}}}},"business_tags_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_operations","required":["too_many_operations"],"properties":{"too_many_operations":{"type":"object","title":"too_many_operations","required":["count"],"properties":{"count":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"business_not_found","required":["business_not_found"],"properties":{"business_not_found":{"type":"object","title":"business_not_found","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"invalid_tag_id","required":["invalid_tag_id"],"properties":{"invalid_tag_id":{"type":"object","title":"invalid_tag_id","required":["tag"],"properties":{"tag":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"conflicting_operations","required":["conflicting_operations"],"properties":{"conflicting_operations":{"type":"object","title":"conflicting_operations","required":["business_id","organization_id","tag"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"tag":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"business_tags_update.Request":{"type":"object","title":"business_tags_update.Request","required":["operations"],"properties":{"operations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_tags_update.TagOperation"}}}},"business_tags_update.Response":{"type":"object","title":"business_tags_update.Response","required":["businesses"],"properties":{"businesses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_tags_update.BusinessTags"}}}},"business_tags_update.TagChange":{"oneOf":[{"type":"object","title":"insert","required":["insert"],"properties":{"insert":{"type":"object","title":"insert","required":["tag"],"properties":{"tag":{"$ref":"#/components/schemas/business_network.Tag"}}}}},{"type":"object","title":"remove","required":["remove"],"properties":{"remove":{"type":"object","title":"remove","required":["tag"],"properties":{"tag":{"$ref":"#/components/schemas/business_network.Tag"}}}}}]},"business_tags_update.TagOperation":{"type":"object","title":"business_tags_update.TagOperation","required":["business_id","change","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"change":{"$ref":"#/components/schemas/business_tags_update.TagChange"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"businesses_get.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"organization_not_found"},{"const":"business_not_found"}]},"businesses_get.Request":{"type":"object","title":"businesses_get.Request","required":["id"],"properties":{"id":{"description":"The business id","$ref":"#/components/schemas/uuid.Uuid"}}},"businesses_get.Response":{"allOf":[{"$ref":"#/components/schemas/business_network.Business"},{"type":"object","title":"businesses_get.Response","properties":{}}]},"businesses_insert.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_order_email"},{"const":"business_name_is_empty"},{"type":"object","title":"business_already_exists","required":["business_already_exists"],"properties":{"business_already_exists":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"organization_not_found"},{"const":"duplicated_store_addresses"},{"const":"region_does_not_exist"},{"const":"subregion_does_not_exist"},{"const":"shipping_address_is_empty"},{"const":"business_profile_requires_uniqueness"},{"const":"repairer_and_insurer_are_exclusive"},{"const":"store_address_name_mismatch"},{"type":"object","title":"invalid_quick_notes","required":["invalid_quick_notes"],"properties":{"invalid_quick_notes":{"$ref":"#/components/schemas/businesses_order_quick_notes.QuickNotesError"}}}]},"businesses_insert.Request":{"type":"object","title":"businesses_insert.Request","required":["name","profile"],"properties":{"name":{"description":"The name of the business.","$ref":"#/components/schemas/std.string.String"},"profile":{"description":"The profile of the business.\n\nThis determines the type of the business and can be one of:\n- `Supplier`\n- `Repairer`\n- `RepairerSite`\n- `Insurer`","$ref":"#/components/schemas/business_network.BusinessProfile"}}},"businesses_insert.Response":{"type":"object","title":"businesses_insert.Response","required":["id"],"properties":{"id":{"description":"The id of the newly created business","$ref":"#/components/schemas/uuid.Uuid"}}},"businesses_insurer_get.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"business_not_found"}]},"businesses_insurer_get.InsurerBusinessReducedModel":{"type":"object","title":"businesses_insurer_get.InsurerBusinessReducedModel","required":["business_id","name","notification_email","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"notification_email":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"businesses_insurer_get.Request":{"type":"object","title":"businesses_insurer_get.Request","required":["business_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"businesses_insurer_get.Response":{"allOf":[{"$ref":"#/components/schemas/businesses_insurer_get.InsurerBusinessReducedModel"},{"type":"object","title":"businesses_insurer_get.Response","properties":{}}]},"businesses_list.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"empty_profiles_in_request"}]},"businesses_list.Request":{"type":"object","title":"businesses_list.Request","required":["profiles"],"properties":{"profiles":{"description":"One or more specific business types to filter by","type":"array","items":{"$ref":"#/components/schemas/business_network.BusinessProfileKind"}}}},"businesses_list.Response":{"type":"object","title":"businesses_list.Response","required":["items"],"properties":{"items":{"description":"The array of businesses","type":"array","items":{"$ref":"#/components/schemas/business_network.Business"}}}},"businesses_order_quick_notes.QuickNotesError":{"oneOf":[{"const":"too_many"},{"type":"object","title":"label_blank","required":["label_blank"],"properties":{"label_blank":{"type":"object","title":"label_blank","required":["index"],"properties":{"index":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"label_too_long","required":["label_too_long"],"properties":{"label_too_long":{"type":"object","title":"label_too_long","required":["index"],"properties":{"index":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"label_invalid_character","required":["label_invalid_character"],"properties":{"label_invalid_character":{"type":"object","title":"label_invalid_character","required":["index"],"properties":{"index":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"text_blank","required":["text_blank"],"properties":{"text_blank":{"type":"object","title":"text_blank","required":["index"],"properties":{"index":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"text_too_long","required":["text_too_long"],"properties":{"text_too_long":{"type":"object","title":"text_too_long","required":["index"],"properties":{"index":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"text_invalid_character","required":["text_invalid_character"],"properties":{"text_invalid_character":{"type":"object","title":"text_invalid_character","required":["index"],"properties":{"index":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"label_duplicated","required":["label_duplicated"],"properties":{"label_duplicated":{"type":"object","title":"label_duplicated","required":["index"],"properties":{"index":{"$ref":"#/components/schemas/u32"}}}}}]},"businesses_remove.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"business_not_exist","required":["business_not_exist"],"properties":{"business_not_exist":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"businesses_remove.Request":{"type":"object","title":"businesses_remove.Request","required":["id"],"properties":{"id":{"description":"The business id that will be used for deletion","$ref":"#/components/schemas/uuid.Uuid"}}},"businesses_repairers_get.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"business_not_found"},{"const":"not_a_repairer_site"},{"const":"no_repairer"},{"const":"multiple_repairers"}]},"businesses_repairers_get.Request":{"type":"object","title":"businesses_repairers_get.Request","required":["repairer_site_id"],"properties":{"repairer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"businesses_search.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"name_filter_too_short"},{"const":"cursor_not_valid"}]},"businesses_search.Request":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"type":"object","title":"businesses_search.Request","required":["profile_kind"],"properties":{"business_ids":{"description":"The list of businesses to fetch information for","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"country_code":{"description":"The country of the owning organization","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"name_filter":{"description":"Business name, at least 3 characters long","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_ids":{"description":"The organization to filter by","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"profile_kind":{"description":"Business profile kind","$ref":"#/components/schemas/business_network.BusinessProfileKind"}}}]},"businesses_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"business_not_exist","required":["business_not_exist"],"properties":{"business_not_exist":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"business_name_is_empty"},{"const":"invalid_profile"},{"const":"duplicated_store_addresses"},{"const":"region_does_not_exist"},{"const":"region_update_forbidden"},{"const":"subregion_does_not_exist"},{"const":"subregion_update_forbidden"},{"const":"invalid_order_email"},{"const":"invalid_assessor_email"},{"const":"store_address_name_mismatch"},{"type":"object","title":"invalid_quick_notes","required":["invalid_quick_notes"],"properties":{"invalid_quick_notes":{"$ref":"#/components/schemas/businesses_order_quick_notes.QuickNotesError"}}}]},"businesses_update.Request":{"type":"object","title":"businesses_update.Request","required":["id"],"properties":{"id":{"description":"The business id which will be updated","$ref":"#/components/schemas/uuid.Uuid"},"new_name":{"description":"The new business name","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"profile":{"description":"The profile of the business.\n\nThis determines the type of the business and can be one of:\n- `Supplier`\n- `Repairer`\n- `RepairerSite`\n- `Insurer`","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.BusinessProfile"}]}}},"businesses_update.Response":{"type":"object","title":"businesses_update.Response","required":["id"],"properties":{"id":{"description":"The id of the updated business","$ref":"#/components/schemas/uuid.Uuid"}}},"chrono.NaiveDate":{"description":"Date without timezone (%Y-%m-%d)","type":"string","format":"date"},"chrono.NaiveDateTime":{"description":"Date time without timezone (%Y-%m-%dT%H:%M:%S%.f)","type":"string","format":"date-time"},"commerce.CommerceRulesError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_request","required":["invalid_request"],"properties":{"invalid_request":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"rule_variant_mismatch","required":["rule_variant_mismatch"],"properties":{"rule_variant_mismatch":{"type":"object","title":"rule_variant_mismatch","required":["actual","expected"],"properties":{"actual":{"$ref":"#/components/schemas/commerce.group.CommerceRuleVariant"},"expected":{"$ref":"#/components/schemas/commerce.group.CommerceRuleVariant"}}}}},{"type":"object","title":"mapping","required":["mapping"],"properties":{"mapping":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"rules_engine","required":["rules_engine"],"properties":{"rules_engine":{"$ref":"#/components/schemas/commerce_rules.DecisionModelError"}}},{"type":"object","title":"invalid_context","required":["invalid_context"],"properties":{"invalid_context":{"type":"object","title":"invalid_context","required":["mapped","request"],"properties":{"mapped":{"$ref":"#/components/schemas/std.string.String"},"request":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"commerce.evaluate.Buyer":{"type":"object","title":"commerce.evaluate.Buyer","required":["location","repairer_site_id"],"properties":{"location":{"$ref":"#/components/schemas/commerce.evaluate.Location"},"repairer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"commerce.evaluate.CommerceRuleContextV1":{"type":"object","title":"commerce.evaluate.CommerceRuleContextV1","required":["buyer","inventory","sellable"],"properties":{"buyer":{"$ref":"#/components/schemas/commerce.evaluate.Buyer"},"inventory":{"$ref":"#/components/schemas/commerce.evaluate.Inventory"},"sellable":{"$ref":"#/components/schemas/commerce.evaluate.Sellable"},"vehicle":{"$ref":"#/components/schemas/commerce.evaluate.Vehicle"},"work_provider":{"$ref":"#/components/schemas/commerce.evaluate.WorkProvider"}}},"commerce.evaluate.Condition":{"oneOf":[{"const":"new"},{"const":"used"}]},"commerce.evaluate.GapcBrand":{"type":"object","title":"commerce.evaluate.GapcBrand","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.evaluate.GapcPart":{"type":"object","title":"commerce.evaluate.GapcPart","required":["gapc_brand","gapc_part_type","mpn"],"properties":{"gapc_brand":{"$ref":"#/components/schemas/commerce.evaluate.GapcBrand"},"gapc_part_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.GapcPartType"}]},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.evaluate.GapcPartType":{"type":"object","title":"commerce.evaluate.GapcPartType","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.evaluate.Ghca":{"type":"object","title":"commerce.evaluate.Ghca","required":["id"],"properties":{"gapc_part_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.GapcPartType"}]},"id":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.evaluate.Inventory":{"type":"object","title":"commerce.evaluate.Inventory","required":["locations","total_estimated_quantity","total_quantity"],"properties":{"locations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.evaluate.InventoryLocation"}},"total_estimated_quantity":{"$ref":"#/components/schemas/u32"},"total_quantity":{"$ref":"#/components/schemas/u32"}}},"commerce.evaluate.InventoryLocation":{"type":"object","title":"commerce.evaluate.InventoryLocation","required":["address","available_on_request","estimated_quantity","quantity","store_address_id"],"properties":{"address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.ShippingAddress"}]},"available_on_request":{"$ref":"#/components/schemas/bool"},"estimated_quantity":{"$ref":"#/components/schemas/u32"},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"commerce.evaluate.Item":{"type":"object","title":"commerce.evaluate.Item","required":["group_business_id","mapped_business_id","target"],"properties":{"group_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"mapped_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"target":{"$ref":"#/components/schemas/commerce.evaluate.Target"}}},"commerce.evaluate.ItemError":{"oneOf":[{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_context","required":["invalid_context"],"properties":{"invalid_context":{"type":"object","title":"invalid_context","required":["mapped","request"],"properties":{"mapped":{"$ref":"#/components/schemas/std.string.String"},"request":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"failed","required":["failed"],"properties":{"failed":{"type":"object","title":"failed","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"commerce.evaluate.Location":{"type":"object","title":"commerce.evaluate.Location","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/commerce.evaluate.ShippingAddress"}}},"commerce.evaluate.MarginPolicyOutput":{"type":"object","title":"commerce.evaluate.MarginPolicyOutput","required":["margin"],"properties":{"margin":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.evaluate.Outcome":{"oneOf":[{"type":"object","title":"output","required":["output"],"properties":{"output":{"$ref":"#/components/schemas/commerce.evaluate.Output"}}},{"type":"object","title":"error","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/commerce.evaluate.ItemError"}}}]},"commerce.evaluate.Output":{"oneOf":[{"type":"object","title":"pricing","required":["pricing"],"properties":{"pricing":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.PricePolicyOutput"}]}}},{"type":"object","title":"shipping","required":["shipping"],"properties":{"shipping":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.ShippingPolicyOutput"}]}}},{"type":"object","title":"shipping_pricing","required":["shipping_pricing"],"properties":{"shipping_pricing":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.ShippingPricingOutput"}]}}},{"type":"object","title":"margin","required":["margin"],"properties":{"margin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.MarginPolicyOutput"}]}}}]},"commerce.evaluate.PartRef":{"oneOf":[{"type":"object","title":"ghca","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"ghca"}}},{"type":"object","title":"part_type","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"part_type"}}}]},"commerce.evaluate.Price":{"type":"object","title":"commerce.evaluate.Price","required":["dealer","retail","rrp","trade","wholesale"],"properties":{"dealer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"retail":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"wholesale":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"commerce.evaluate.PricePolicyOutput":{"type":"object","title":"commerce.evaluate.PricePolicyOutput","required":["price"],"properties":{"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"commerce.evaluate.Request":{"type":"object","title":"commerce.evaluate.Request","required":["items"],"properties":{"items":{"description":"A value whose length (characters for strings, items for arrays) must be within MIN..=MAX (inclusive). Violating requests are rejected with HTTP 400.","type":"array","prefixItems":[{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.evaluate.Item"}}]}}},"commerce.evaluate.Response":{"type":"object","title":"commerce.evaluate.Response","required":["items"],"properties":{"items":{"description":"Index-aligned with the request items.","type":"array","items":{"$ref":"#/components/schemas/commerce.evaluate.Outcome"}}}},"commerce.evaluate.Sellable":{"type":"object","title":"commerce.evaluate.Sellable","required":["condition","gapc_part","ghca","price","sku","tags"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.Condition"}]},"gapc_part":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.GapcPart"}]},"ghca":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.evaluate.Ghca"}]},"price":{"$ref":"#/components/schemas/commerce.evaluate.Price"},"sku":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"commerce.evaluate.ShippingAddress":{"type":"object","title":"commerce.evaluate.ShippingAddress","required":["city","country_code","postcode","state","street_name","street_number","suburb","unit"],"properties":{"city":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"country_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"postcode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"street_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"street_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"suburb":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"commerce.evaluate.ShippingLine":{"type":"object","title":"commerce.evaluate.ShippingLine","required":["part","quantity"],"properties":{"part":{"$ref":"#/components/schemas/commerce.evaluate.PartRef"},"quantity":{"$ref":"#/components/schemas/u32"}}},"commerce.evaluate.ShippingPolicyOutput":{"type":"object","title":"commerce.evaluate.ShippingPolicyOutput","required":["arrival_time","business_days","eta","store_address_id"],"properties":{"arrival_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"business_days":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"eta":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"commerce.evaluate.ShippingPricingContextV2":{"type":"object","title":"commerce.evaluate.ShippingPricingContextV2","required":["lines"],"properties":{"lines":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.evaluate.ShippingLine"}}}},"commerce.evaluate.ShippingPricingOutput":{"type":"object","title":"commerce.evaluate.ShippingPricingOutput","required":["price"],"properties":{"price":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.evaluate.Target":{"oneOf":[{"type":"object","title":"pricing_v1","required":["pricing_v1"],"properties":{"pricing_v1":{"$ref":"#/components/schemas/commerce.evaluate.CommerceRuleContextV1"}}},{"type":"object","title":"shipping_v1","required":["shipping_v1"],"properties":{"shipping_v1":{"$ref":"#/components/schemas/commerce.evaluate.CommerceRuleContextV1"}}},{"type":"object","title":"shipping_pricing_v2","required":["shipping_pricing_v2"],"properties":{"shipping_pricing_v2":{"$ref":"#/components/schemas/commerce.evaluate.ShippingPricingContextV2"}}},{"type":"object","title":"margin_v1","required":["margin_v1"],"properties":{"margin_v1":{"$ref":"#/components/schemas/commerce.evaluate.CommerceRuleContextV1"}}}]},"commerce.evaluate.Vehicle":{"type":"object","title":"commerce.evaluate.Vehicle","required":["make"],"properties":{"make":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"commerce.evaluate.WorkProvider":{"type":"object","title":"commerce.evaluate.WorkProvider","required":["organization_id"],"properties":{"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"commerce.group.CommerceRuleVariant":{"oneOf":[{"const":"pricing_v1"},{"const":"shipping_v1"},{"const":"shipping_pricing_v2"},{"const":"zone_v1"},{"const":"margin_v1"}]},"commerce.group.GetRequest":{"type":"object","title":"commerce.group.GetRequest","required":["group_id"],"properties":{"group_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"commerce.group.RepairerGroup":{"type":"object","title":"commerce.group.RepairerGroup","required":["business_id","created_at","id","is_default","name","updated_at","variant"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default":{"$ref":"#/components/schemas/bool"},"mappings":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Mapping"}},"name":{"$ref":"#/components/schemas/std.string.String"},"rule":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.rule.Rule"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"variant":{"$ref":"#/components/schemas/commerce.group.RepairerVariant"}}},"commerce.group.RepairerGroupV2":{"type":"object","title":"commerce.group.RepairerGroupV2","required":["business_id","created_at","id","is_default","name","updated_at","variant"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default":{"$ref":"#/components/schemas/bool"},"mappings":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Mapping"}},"name":{"$ref":"#/components/schemas/std.string.String"},"rule":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.rule.RuleV2"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"variant":{"$ref":"#/components/schemas/commerce.group.RepairerVariant"}}},"commerce.group.RepairerInsertRequest":{"type":"object","title":"commerce.group.RepairerInsertRequest","required":["is_default","name","variant"],"properties":{"is_default":{"$ref":"#/components/schemas/bool"},"name":{"$ref":"#/components/schemas/std.string.String"},"variant":{"$ref":"#/components/schemas/commerce.group.RepairerVariant"}}},"commerce.group.RepairerListFilter":{"type":"object","title":"commerce.group.RepairerListFilter","required":["variant"],"properties":{"variant":{"$ref":"#/components/schemas/commerce.group.RepairerVariant"}}},"commerce.group.RepairerListRequest":{"type":"object","title":"commerce.group.RepairerListRequest","required":["page"],"properties":{"filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.group.RepairerListFilter"}]},"page":{"$ref":"#/components/schemas/PageRequest"}}},"commerce.group.RepairerUpdateRequest":{"type":"object","title":"commerce.group.RepairerUpdateRequest","required":["group_id","is_default","name"],"properties":{"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default":{"$ref":"#/components/schemas/bool"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.group.RepairerVariant":{"oneOf":[{"const":"margin_v1"}]},"commerce.group.SupplierGroup":{"type":"object","title":"commerce.group.SupplierGroup","required":["business_id","created_at","id","is_default","name","updated_at","variant"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default":{"$ref":"#/components/schemas/bool"},"mappings":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Mapping"}},"name":{"$ref":"#/components/schemas/std.string.String"},"rule":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.rule.Rule"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"variant":{"$ref":"#/components/schemas/commerce.group.SupplierVariant"}}},"commerce.group.SupplierGroupV2":{"type":"object","title":"commerce.group.SupplierGroupV2","required":["business_id","created_at","id","is_default","name","updated_at","variant"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default":{"$ref":"#/components/schemas/bool"},"mappings":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Mapping"}},"name":{"$ref":"#/components/schemas/std.string.String"},"rule":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.rule.RuleV2"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"variant":{"$ref":"#/components/schemas/commerce.group.SupplierVariant"}}},"commerce.group.SupplierInsertRequest":{"type":"object","title":"commerce.group.SupplierInsertRequest","required":["is_default","name","variant"],"properties":{"is_default":{"$ref":"#/components/schemas/bool"},"name":{"$ref":"#/components/schemas/std.string.String"},"variant":{"$ref":"#/components/schemas/commerce.group.SupplierVariant"}}},"commerce.group.SupplierListFilter":{"type":"object","title":"commerce.group.SupplierListFilter","required":["variant"],"properties":{"variant":{"$ref":"#/components/schemas/commerce.group.SupplierVariant"}}},"commerce.group.SupplierListRequest":{"type":"object","title":"commerce.group.SupplierListRequest","required":["page"],"properties":{"filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/commerce.group.SupplierListFilter"}]},"page":{"$ref":"#/components/schemas/PageRequest"}}},"commerce.group.SupplierUpdateRequest":{"type":"object","title":"commerce.group.SupplierUpdateRequest","required":["group_id","is_default","name"],"properties":{"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_default":{"$ref":"#/components/schemas/bool"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"commerce.group.SupplierVariant":{"oneOf":[{"const":"pricing_v1"},{"const":"shipping_v1"},{"const":"shipping_pricing_v2"},{"const":"zone_v1"}]},"commerce.mapping.Identity":{"type":"object","title":"commerce.mapping.Identity","required":["business_id","group_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"group_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"commerce.mapping.Mapping":{"type":"object","title":"commerce.mapping.Mapping","required":["business_id","created_at","group_id","updated_at"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"commerce.mapping.UpdateRequest":{"type":"object","title":"commerce.mapping.UpdateRequest","properties":{"insert":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Identity"}},"remove":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Identity"}}}},"commerce.mapping.UpdateResponse":{"type":"object","title":"commerce.mapping.UpdateResponse","required":["inserted","removed"],"properties":{"inserted":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Mapping"}},"removed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.mapping.Mapping"}}}},"commerce.rule.Insert":{"description":"The version is assigned by the service (next version for the group).","type":"object","title":"commerce.rule.Insert","required":["decision_model","group_id"],"properties":{"decision_model":{"$ref":"#/components/schemas/commerce_rules.DecisionModelDTO"},"group_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"commerce.rule.InsertV2":{"description":"The version is assigned by the service (next version for the group). The variant is carried\non the schema tag and validated against the group.","type":"object","title":"commerce.rule.InsertV2","required":["group_id","schema"],"properties":{"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"schema":{"$ref":"#/components/schemas/commerce.rule.input.CommerceRuleSchema"}}},"commerce.rule.Rule":{"type":"object","title":"commerce.rule.Rule","required":["created_at","decision_model","group_id","id","updated_at","version"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"decision_model":{"$ref":"#/components/schemas/commerce_rules.DecisionModelDTO"},"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"version":{"$ref":"#/components/schemas/i32"}}},"commerce.rule.RuleV2":{"type":"object","title":"commerce.rule.RuleV2","required":["created_at","group_id","id","schema","updated_at","version"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"group_id":{"$ref":"#/components/schemas/uuid.Uuid"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"schema":{"$ref":"#/components/schemas/commerce.rule.output.CommerceRuleSchema"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"version":{"$ref":"#/components/schemas/i32"}}},"commerce.rule.UpdateRequest":{"type":"object","title":"commerce.rule.UpdateRequest","properties":{"insert":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.rule.Insert"}},"remove":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"commerce.rule.UpdateRequestV2":{"type":"object","title":"commerce.rule.UpdateRequestV2","properties":{"insert":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.rule.InsertV2"}},"remove":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"commerce.rule.UpdateResponse":{"type":"object","title":"commerce.rule.UpdateResponse","required":["inserted","removed"],"properties":{"inserted":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.rule.Rule"}},"removed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.rule.Rule"}}}},"commerce.rule.UpdateResponseV2":{"type":"object","title":"commerce.rule.UpdateResponseV2","required":["inserted","removed"],"properties":{"inserted":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.rule.RuleV2"}},"removed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.rule.RuleV2"}}}},"commerce.rule.input.CommerceRuleSchema":{"oneOf":[{"type":"object","title":"pricing_v1","required":["pricing_v1"],"properties":{"pricing_v1":{"type":"object","title":"commerce_rules_rs.input.TypedDecisionModel<commerce_rules_rs.input.CommerceRuleContextV1, commerce_rules_rs.PricePolicyOutput>","required":["data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"shipping_v1","required":["shipping_v1"],"properties":{"shipping_v1":{"type":"object","title":"commerce_rules_rs.input.TypedDecisionModel<commerce_rules_rs.input.CommerceRuleContextV1, commerce_rules_rs.input.ShippingPolicyOutput>","required":["data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"shipping_pricing_v2","required":["shipping_pricing_v2"],"properties":{"shipping_pricing_v2":{"type":"object","title":"commerce_rules_rs.input.TypedDecisionModel<commerce_rules_rs.ShippingPricingContextV2, commerce_rules_rs.ShippingPricingConfigV2>","required":["data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"zone_v1","required":["zone_v1"],"properties":{"zone_v1":{"type":"object","title":"commerce_rules_rs.input.TypedDecisionModel<commerce_rules_rs.ZoneContext, commerce_rules_rs.ZoneConfigV1>","required":["data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"margin_v1","required":["margin_v1"],"properties":{"margin_v1":{"type":"object","title":"commerce_rules_rs.input.TypedDecisionModel<commerce_rules_rs.input.CommerceRuleContextV1, commerce_rules_rs.MarginPolicyOutput>","required":["data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}}]},"commerce.rule.output.CommerceRuleSchema":{"oneOf":[{"type":"object","title":"pricing_v1","required":["pricing_v1"],"properties":{"pricing_v1":{"type":"object","title":"commerce_rules_rs.output.TypedDecisionModel<commerce_rules_rs.output.CommerceRuleContextV1, commerce_rules_rs.PricePolicyOutput>","required":["_context","_output","data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"shipping_v1","required":["shipping_v1"],"properties":{"shipping_v1":{"type":"object","title":"commerce_rules_rs.output.TypedDecisionModel<commerce_rules_rs.output.CommerceRuleContextV1, commerce_rules_rs.output.ShippingPolicyOutput>","required":["_context","_output","data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"shipping_pricing_v2","required":["shipping_pricing_v2"],"properties":{"shipping_pricing_v2":{"type":"object","title":"commerce_rules_rs.output.TypedDecisionModel<commerce_rules_rs.ShippingPricingContextV2, commerce_rules_rs.ShippingPricingConfigV2>","required":["_context","_output","data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"zone_v1","required":["zone_v1"],"properties":{"zone_v1":{"type":"object","title":"commerce_rules_rs.output.TypedDecisionModel<commerce_rules_rs.ZoneContext, commerce_rules_rs.ZoneConfigV1>","required":["_context","_output","data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"margin_v1","required":["margin_v1"],"properties":{"margin_v1":{"type":"object","title":"commerce_rules_rs.output.TypedDecisionModel<commerce_rules_rs.output.CommerceRuleContextV1, commerce_rules_rs.MarginPolicyOutput>","required":["_context","_output","data","decision_model_type","metadata"],"properties":{"_context":{"description":"Zero-sized phantom data","type":"null"},"_output":{"description":"Zero-sized phantom data","type":"null"},"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}}}}]},"commerce.tier.ListResponse":{"description":"The size-tier catalogue plus the part-type → tier assignments. Both are read-only reference data.","type":"object","title":"commerce.tier.ListResponse","required":["part_type_tiers","size_tiers"],"properties":{"part_type_tiers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.tier.PartTypeTier"}},"size_tiers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce.tier.SizeTier"}}}},"commerce.tier.PartTypeTier":{"type":"object","title":"commerce.tier.PartTypeTier","required":["gapc_part_type_id","tier"],"properties":{"gapc_part_type_id":{"$ref":"#/components/schemas/std.string.String"},"tier":{"$ref":"#/components/schemas/i16"}}},"commerce.tier.SizeTier":{"type":"object","title":"commerce.tier.SizeTier","required":["label","tier"],"properties":{"label":{"$ref":"#/components/schemas/std.string.String"},"tier":{"$ref":"#/components/schemas/i16"}}},"commerce_rules.DecisionModelDTO":{"description":"A struct to serialize and deserialize the decision model","type":"object","title":"commerce_rules.DecisionModelDTO","required":["data","decision_model_type","metadata"],"properties":{"data":{"$ref":"#/components/schemas/serde_json.Value"},"decision_model_type":{"$ref":"#/components/schemas/commerce_rules.DecisionModelType"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}},"commerce_rules.DecisionModelError":{"oneOf":[{"type":"object","title":"json_error","required":["json_error"],"properties":{"json_error":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"partly_decision_model_evaluation_error","required":["partly_decision_model_evaluation_error"],"properties":{"partly_decision_model_evaluation_error":{"$ref":"#/components/schemas/commerce_rules.PartlyDecisionModelEvaluationError"}}},{"type":"object","title":"type_validation","required":["type_validation"],"properties":{"type_validation":{"$ref":"#/components/schemas/commerce_rules.TypedValidationError"}}}]},"commerce_rules.DecisionModelType":{"oneOf":[{"const":"partly_decided_v1"}]},"commerce_rules.PartlyDecisionModelEvaluationError":{"oneOf":[{"type":"object","title":"invalid_expression","required":["invalid_expression"],"properties":{"invalid_expression":{"type":"object","title":"invalid_expression","required":["message","rule_index"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"},"rule_index":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"evaluation_failed","required":["evaluation_failed"],"properties":{"evaluation_failed":{"type":"object","title":"evaluation_failed","required":["message","rule_index"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"},"rule_index":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"deserialize_failed","required":["deserialize_failed"],"properties":{"deserialize_failed":{"type":"object","title":"deserialize_failed","required":["message","rule_index"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"},"rule_index":{"$ref":"#/components/schemas/usize"}}}}}]},"commerce_rules.TypedFailureKind":{"oneOf":[{"const":"precondition"},{"const":"output"},{"const":"mode","description":"Policy-level mode mismatch; `rule_name`/`rule_index` are `None`."}]},"commerce_rules.TypedValidationError":{"type":"object","title":"commerce_rules.TypedValidationError","required":["failures"],"properties":{"failures":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/commerce_rules.TypedValidationFailure"}}}},"commerce_rules.TypedValidationFailure":{"type":"object","title":"commerce_rules.TypedValidationFailure","required":["error","expression","kind","rule_index","rule_name"],"properties":{"error":{"$ref":"#/components/schemas/std.string.String"},"expression":{"description":"The zen expression that failed (or the output key, for a missing output).","$ref":"#/components/schemas/std.string.String"},"kind":{"$ref":"#/components/schemas/commerce_rules.TypedFailureKind"},"rule_index":{"description":"1-based rule index within the policy.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/usize"}]},"rule_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"core_server_feature_flags.EvaluateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"core_server_feature_flags.EvaluateRequest":{"type":"object","title":"core_server_feature_flags.EvaluateRequest","required":["default","key"],"properties":{"default":{"$ref":"#/components/schemas/core_server_feature_flags.FlagValue"},"key":{"$ref":"#/components/schemas/std.string.String"}}},"core_server_feature_flags.EvaluateResponse":{"type":"object","title":"core_server_feature_flags.EvaluateResponse","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/core_server_feature_flags.FlagValue"}}},"core_server_feature_flags.FlagValue":{"oneOf":[{"type":"object","title":"bool","required":["bool"],"properties":{"bool":{"$ref":"#/components/schemas/bool"}}},{"type":"object","title":"string","required":["string"],"properties":{"string":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"int","required":["int"],"properties":{"int":{"$ref":"#/components/schemas/i64"}}},{"type":"object","title":"float","required":["float"],"properties":{"float":{"$ref":"#/components/schemas/f64"}}}]},"dismantler.DismantlerError":{"oneOf":[{"type":"object","title":"unprocessable_entity","required":["unprocessable_entity"],"properties":{"unprocessable_entity":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"dismantler.DismantlerSellable":{"type":"object","title":"dismantler.DismantlerSellable","required":["assembly_id","ghca","id"],"properties":{"assembly_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"ghca":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/dismantler.HumanCentricAssemblySnippet"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"dismantler.DismantlerVehicleGetRequest":{"type":"object","title":"dismantler.DismantlerVehicleGetRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/dismantler.VehicleIdentity"}}},"dismantler.DismantlerVehicleInsertRequest":{"type":"object","title":"dismantler.DismantlerVehicleInsertRequest","required":["oem_vehicle_id","uvdb_property_ids","vehicle_reference"],"properties":{"oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"},"sellables":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/dismantler.DismantlerSellable"}}]},"uvdb_property_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"vehicle_reference":{"$ref":"#/components/schemas/std.string.String"},"vehicle_status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/dismantler.DonorVehicleStatus"}]}}},"dismantler.DismantlerVehicleInsertResponse":{"type":"object","title":"dismantler.DismantlerVehicleInsertResponse","required":["vehicle"],"properties":{"vehicle":{"$ref":"#/components/schemas/dismantler.DismantlerVehicleModel"}}},"dismantler.DismantlerVehicleModel":{"type":"object","title":"dismantler.DismantlerVehicleModel","required":["chassis_number","created_at","id","oem_vehicle_id","sellables","status","store_id","updated_at","uvdb_property_ids"],"properties":{"chassis_number":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"dismantler_vehicle_ref":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"},"sellables":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/dismantler.DismantlerSellable"}}]},"status":{"$ref":"#/components/schemas/dismantler.DonorVehicleStatus"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"uvdb_property_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"dismantler.DismantlerVehicleSearchRequest":{"type":"object","title":"dismantler.DismantlerVehicleSearchRequest","properties":{"chassis_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"dismantler_vehicle_ref":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/PageRequest"}]},"vehicle_status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/dismantler.DonorVehicleStatus"}]}}},"dismantler.DismantlerVehicleUpdateRequest":{"type":"object","title":"dismantler.DismantlerVehicleUpdateRequest","required":["vehicle_id"],"properties":{"sellables":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/dismantler.DismantlerSellable"}}]},"vehicle_id":{"$ref":"#/components/schemas/uuid.Uuid"},"vehicle_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/dismantler.DonorVehicleStatus"}]}}},"dismantler.DonorVehicleStatus":{"oneOf":[{"const":"unknown"},{"const":"in_yard"},{"const":"dismantled"},{"const":"scrapped"}]},"dismantler.HumanCentricAssemblySnippet":{"type":"object","title":"dismantler.HumanCentricAssemblySnippet","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"dismantler.VehicleIdentity":{"oneOf":[{"type":"object","title":"chassis_number","required":["chassis_number"],"properties":{"chassis_number":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"dismantler.YardVehicleCountResponse":{"type":"object","title":"dismantler.YardVehicleCountResponse","required":["capacity","count"],"properties":{"capacity":{"$ref":"#/components/schemas/u32"},"count":{"$ref":"#/components/schemas/u64"}}},"email_repository.generated.email.EmailTemplate":{"type":"object","title":"email_repository.generated.email.EmailTemplate","required":["created_at","deleted_at","html_body","id","kind","organization_id","updated_at","updated_by"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"html_body":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/email_repository.template_kind.TemplateKind"},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/uuid.Uuid"}}},"email_repository.template_kind.TemplateKind":{"oneOf":[{"const":"off_network_order","description":"The order relay sent to a supplier that is not on the Partly platform."}]},"email_templates.DefaultInsertRequest":{"type":"object","title":"email_templates.DefaultInsertRequest","required":["html_body","kind"],"properties":{"html_body":{"$ref":"#/components/schemas/std.string.String"},"kind":{"$ref":"#/components/schemas/email_repository.template_kind.TemplateKind"}}},"email_templates.DefaultInsertResponse":{"type":"object","title":"email_templates.DefaultInsertResponse","required":["template"],"properties":{"template":{"$ref":"#/components/schemas/email_repository.generated.email.EmailTemplate"}}},"email_templates.GetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"email_templates.GetRequest":{"type":"object","title":"email_templates.GetRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"email_templates.GetResponse":{"type":"object","title":"email_templates.GetResponse","required":["template"],"properties":{"template":{"$ref":"#/components/schemas/email_repository.generated.email.EmailTemplate"}}},"email_templates.InsertRequest":{"type":"object","title":"email_templates.InsertRequest","required":["html_body","kind"],"properties":{"html_body":{"$ref":"#/components/schemas/std.string.String"},"kind":{"$ref":"#/components/schemas/email_repository.template_kind.TemplateKind"}}},"email_templates.InsertResponse":{"type":"object","title":"email_templates.InsertResponse","required":["template"],"properties":{"template":{"$ref":"#/components/schemas/email_repository.generated.email.EmailTemplate"}}},"email_templates.ListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"email_templates.ListRequest":{"type":"object","title":"email_templates.ListRequest","properties":{}},"email_templates.ListResponse":{"type":"object","title":"email_templates.ListResponse","required":["templates"],"properties":{"templates":{"description":"The organisation's own templates and the platform templates, together. The set is small, so\ncallers filter it rather than asking the server to.","type":"array","items":{"$ref":"#/components/schemas/email_repository.generated.email.EmailTemplate"}}}},"email_templates.PreviewError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid","required":["invalid"],"properties":{"invalid":{"type":"object","title":"invalid","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"email_templates.PreviewRequest":{"type":"object","title":"email_templates.PreviewRequest","required":["html_body","kind"],"properties":{"html_body":{"$ref":"#/components/schemas/std.string.String"},"kind":{"$ref":"#/components/schemas/email_repository.template_kind.TemplateKind"}}},"email_templates.PreviewResponse":{"type":"object","title":"email_templates.PreviewResponse","required":["html","text"],"properties":{"html":{"description":"What the template produces against a representative payload, after sanitising.","$ref":"#/components/schemas/std.string.String"},"text":{"description":"The plain-text half. Built in code from the payload, not authored, so it is shown here for\ncompleteness rather than for editing.","$ref":"#/components/schemas/std.string.String"}}},"email_templates.RemoveRequest":{"type":"object","title":"email_templates.RemoveRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"email_templates.UpdateRequest":{"type":"object","title":"email_templates.UpdateRequest","required":["html_body","id","kind"],"properties":{"html_body":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/email_repository.template_kind.TemplateKind"}}},"email_templates.UpdateResponse":{"type":"object","title":"email_templates.UpdateResponse","required":["template"],"properties":{"template":{"$ref":"#/components/schemas/email_repository.generated.email.EmailTemplate"}}},"email_templates.WriteError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid","required":["invalid"],"properties":{"invalid":{"type":"object","title":"invalid","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"not_found"},{"const":"already_exists"},{"const":"not_a_user"}]},"f32":{"description":"32-bit floating point number","type":"number"},"f64":{"description":"64-bit floating point number","type":"number"},"i16":{"description":"16-bit signed integer","type":"integer"},"i32":{"description":"32-bit signed integer","type":"integer"},"i64":{"description":"64-bit signed integer","type":"integer"},"incentive.LeaderboardEntry":{"type":"object","title":"incentive.LeaderboardEntry","required":["confirmed_job_count","repairer_location","repairer_site_id"],"properties":{"confirmed_job_count":{"$ref":"#/components/schemas/i64"},"repairer_location":{"$ref":"#/components/schemas/std.string.String"},"repairer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"incentive.LeaderboardGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"incentive.LeaderboardGetRequest":{"type":"object","title":"incentive.LeaderboardGetRequest","properties":{}},"incentive.LeaderboardGetResponse":{"type":"object","title":"incentive.LeaderboardGetResponse","required":["entries"],"properties":{"entries":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/incentive.LeaderboardEntry"}}}},"incentive.StandingsEntry":{"type":"object","title":"incentive.StandingsEntry","required":["confirmed_job_count","is_blitz","rank","repairer_location","repairer_site_id"],"properties":{"confirmed_job_count":{"$ref":"#/components/schemas/i64"},"is_blitz":{"$ref":"#/components/schemas/bool"},"rank":{"$ref":"#/components/schemas/i64"},"repairer_location":{"$ref":"#/components/schemas/std.string.String"},"repairer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"incentive.StandingsGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"incentive.StandingsGetRequest":{"type":"object","title":"incentive.StandingsGetRequest","properties":{}},"incentive.StandingsGetResponse":{"type":"object","title":"incentive.StandingsGetResponse","required":["entries","total_sites"],"properties":{"entries":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/incentive.StandingsEntry"}},"total_sites":{"$ref":"#/components/schemas/i64"}}},"incentive.WorkshopAdmission":{"oneOf":[{"type":"object","title":"locked","required":["deadline","jobs_needed","type"],"properties":{"deadline":{"description":"last NZ day the jobs count toward the current window; absent when no recent jobs","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/chrono.NaiveDate"}]},"jobs_needed":{"$ref":"#/components/schemas/i64"},"type":{"const":"locked"}}},{"type":"object","title":"unlocked","required":["admitted_at","entries","jobs_rank","jobs_to_next_entry","parts_value_rank","type"],"properties":{"admitted_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"entries":{"$ref":"#/components/schemas/i64"},"jobs_rank":{"description":"place among admitted sites by jobs this round; ties share a place","$ref":"#/components/schemas/i64"},"jobs_to_next_entry":{"$ref":"#/components/schemas/i64"},"parts_value_rank":{"description":"place among admitted sites by parts value this round, same ranking","$ref":"#/components/schemas/i64"},"type":{"const":"unlocked"}}}]},"incentive.WorkshopRound":{"type":"object","title":"incentive.WorkshopRound","required":["computed_at","ends_at","starts_at","total_entries"],"properties":{"computed_at":{"description":"when the cross-site figures were last calculated; T&C 11.2 require showing it","type":"string","format":"date-time"},"ends_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"starts_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"total_entries":{"$ref":"#/components/schemas/i64"}}},"incentive.WorkshopSiteStanding":{"type":"object","title":"incentive.WorkshopSiteStanding","required":["admission","jobs","name","parts_value_cents","site_id"],"properties":{"admission":{"$ref":"#/components/schemas/incentive.WorkshopAdmission"},"jobs":{"description":"qualifying jobs this round","$ref":"#/components/schemas/i64"},"name":{"$ref":"#/components/schemas/std.string.String"},"parts_value_cents":{"description":"this site's parts value this round, ex GST and freight","$ref":"#/components/schemas/i64"},"site_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"incentive.WorkshopStandingsGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"incentive.WorkshopStandingsGetRequest":{"type":"object","title":"incentive.WorkshopStandingsGetRequest","properties":{}},"incentive.WorkshopStandingsGetResponse":{"type":"object","title":"incentive.WorkshopStandingsGetResponse","required":["round","sites"],"properties":{"round":{"description":"absent outside the promotion, or when the org isn't taking part","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/incentive.WorkshopRound"}]},"sites":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/incentive.WorkshopSiteStanding"}}}},"ingest.AssemblyParentIdentity":{"oneOf":[{"description":"**Id** in `UUID` format","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"**Id** in `String` format (SKU)","type":"object","title":"sku","required":["sku"],"properties":{"sku":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.AsyncImportsPrepareError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"async_import_already_exists"}]},"ingest.AsyncImportsPrepareRequest":{"type":"object","title":"ingest.AsyncImportsPrepareRequest","required":["internal_feed","job_id"],"properties":{"internal_feed":{"$ref":"#/components/schemas/bool"},"job_id":{"$ref":"#/components/schemas/std.string.String"}}},"ingest.AsyncImportsPrepareResponse":{"type":"object","title":"ingest.AsyncImportsPrepareResponse","required":["file_import_feed_id"],"properties":{"file_import_feed_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"ingest.CandidateInheritanceMode":{"oneOf":[{"const":"automatic_approval"},{"type":"object","title":"manual_approval","required":["manual_approval"],"properties":{"manual_approval":{"type":"object","title":"manual_approval","required":["edition"],"properties":{"edition":{"$ref":"#/components/schemas/i32"}}}}}]},"ingest.CompletedStages":{"type":"object","title":"ingest.CompletedStages","required":["data_ingestor","elasticsearch_ingestor","file_ingestor"],"properties":{"data_ingestor":{"$ref":"#/components/schemas/bool"},"elasticsearch_ingestor":{"$ref":"#/components/schemas/bool"},"file_ingestor":{"$ref":"#/components/schemas/bool"}}},"ingest.DataIngestorIssue":{"oneOf":[{"type":"object","title":"ingest.IssueWithIdentity<ingest.SellableIdentity, ingest.SellableIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableIssue"},"issue_type":{"const":"data_ingest_sellable_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.SellableInventoryIdentity, ingest.SellableInventoryIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableInventoryIssue"},"issue_type":{"const":"data_ingest_sellable_inventory_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.SellableGroupingIdentity, ingest.SellableGroupingIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableGroupingIssue"},"issue_type":{"const":"data_ingest_sellable_grouping_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.SellableTagIdentity, ingest.SellableTagIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableTagIssue"},"issue_type":{"const":"data_ingest_sellable_tag_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.UploadIdentity, ingest.SellableUploadIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableUploadIssue"},"issue_type":{"const":"data_ingest_sellable_upload_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.GapcPartIdentity, ingest.GapcPartIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartIssue"},"issue_type":{"const":"data_ingest_gapc_part_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIssue"},"issue_type":{"const":"data_ingest_gapc_part_inheritance_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIssue"},"issue_type":{"const":"data_ingest_gapc_part_attribute_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIssue"},"issue_type":{"const":"data_ingest_gapc_part_fitment_issue"}}},{"type":"object","title":"ingest.IssueWithIdentity<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeIssue>","required":["identity","issue","issue_type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartInterchangeIssue"},"issue_type":{"const":"data_ingest_gapc_part_interchange_issue"}}}]},"ingest.ExternalBrandIdentity":{"oneOf":[{"type":"object","title":"aaia","required":["aaia"],"properties":{"aaia":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.ExternalPartPositionIdentity":{"oneOf":[{"type":"object","title":"pcdb","required":["pcdb"],"properties":{"pcdb":{"$ref":"#/components/schemas/u64"}}}]},"ingest.ExternalPartTypeIdentity":{"oneOf":[{"type":"object","title":"pcdb","required":["pcdb"],"properties":{"pcdb":{"$ref":"#/components/schemas/u64"}}}]},"ingest.ExternalVehicleDefinitionIdentity":{"oneOf":[{"type":"object","title":"id","required":["data_standard","id"],"properties":{"data_standard":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"name","required":["data_standard","name"],"properties":{"data_standard":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"base_vehicle_by_year_make_model","required":["external_make_id","external_model_id","year_from","year_to"],"properties":{"external_make_id":{"$ref":"#/components/schemas/u64"},"external_model_id":{"$ref":"#/components/schemas/u64"},"year_from":{"$ref":"#/components/schemas/u64"},"year_to":{"$ref":"#/components/schemas/u64"}}}]},"ingest.ExternalVehiclePropertyIdentity":{"oneOf":[{"type":"object","title":"vcdb","required":["vcdb"],"properties":{"vcdb":{"$ref":"#/components/schemas/u64"}}}]},"ingest.FileImportEntity":{"type":"object","title":"ingest.FileImportEntity","required":["completed_stages","count_items_error","count_items_success","count_items_total","format","id","store_id","user_id"],"properties":{"completed_stages":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.CompletedStages"}]},"count_items_error":{"$ref":"#/components/schemas/i32"},"count_items_success":{"$ref":"#/components/schemas/i32"},"count_items_total":{"$ref":"#/components/schemas/i32"},"created_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"file_path":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"format":{"$ref":"#/components/schemas/i32"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"last_processed_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"num_retries":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"},"updated_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"ingest.FileImportEntityIssue":{"type":"object","title":"ingest.FileImportEntityIssue","required":["created_at","id"],"properties":{"created_at":{"$ref":"#/components/schemas/std.string.String"},"file_line_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"issue_content":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.IngestIssue"}]}}},"ingest.FileImportRowReconcilePolicy":{"oneOf":[{"const":"delete_prev_except_current"},{"const":"delete_origin_except_source"},{"const":"keep_all"},{"const":"reset_missing_row_defaults"}]},"ingest.FileImportsGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"ingest.FileImportsInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"data_origin_required_when_data_stream_set"},{"const":"data_origin_and_prev_file_path_mutually_exclusive"},{"const":"data_origin_required_when_delete_origin_except_source"},{"const":"data_stream_not_allowed_when_delete_origin_except_source"},{"const":"prev_file_path_or_data_origin_required_when_ignore_data_columns_header_diff"},{"const":"ignore_data_columns_header_diff_requires_previous_file"},{"const":"ignore_data_columns_header_diff_not_allowed_when_keep_all"},{"const":"ignore_data_columns_header_diff_not_allowed_when_delete_origin_except_source"},{"const":"missing_row_defaults_only_allowed_for_reset_policy"},{"const":"missing_row_defaults_required_for_reset_policy"},{"const":"missing_row_defaults_value_must_be_scalar"},{"const":"prev_file_path_self_reference"},{"const":"invalid_file_path"},{"const":"prev_file_not_found"},{"const":"prev_file_ingest_not_completed"}]},"ingest.FileImportsIssuesListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.FileImportsListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.FileIngestorIssue":{"oneOf":[{"type":"object","title":"issue","required":["issue"],"properties":{"issue":{"$ref":"#/components/schemas/ingest.FileIngestorIssueItem"}}}]},"ingest.FileIngestorIssueItem":{"oneOf":[{"const":"missing_header"},{"const":"empty_file"},{"type":"object","title":"invalid_column_count","required":["invalid_column_count"],"properties":{"invalid_column_count":{"type":"object","title":"invalid_column_count","required":["actual_length","expected_length"],"properties":{"actual_length":{"$ref":"#/components/schemas/u64"},"expected_length":{"$ref":"#/components/schemas/u64"}}}}},{"type":"object","title":"unrecognized_column","required":["unrecognized_column"],"properties":{"unrecognized_column":{"type":"object","title":"unrecognized_column","required":["actual_value","column_name"],"properties":{"actual_value":{"$ref":"#/components/schemas/std.string.String"},"column_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"mutually_exclusive_columns","required":["mutually_exclusive_columns"],"properties":{"mutually_exclusive_columns":{"type":"object","title":"mutually_exclusive_columns","required":["columns"],"properties":{"columns":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"row_too_large","required":["row_too_large"],"properties":{"row_too_large":{"type":"object","title":"row_too_large","required":["actual_length","max_length"],"properties":{"actual_length":{"$ref":"#/components/schemas/u32"},"max_length":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"duplicate_header_column","required":["duplicate_header_column"],"properties":{"duplicate_header_column":{"type":"object","title":"duplicate_header_column","required":["column_name"],"properties":{"column_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"missing_required_column","required":["missing_required_column"],"properties":{"missing_required_column":{"type":"object","title":"missing_required_column","required":["column_name","triggered_by"],"properties":{"column_name":{"$ref":"#/components/schemas/std.string.String"},"triggered_by":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"invalid_cell_value","required":["invalid_cell_value"],"properties":{"invalid_cell_value":{"type":"object","title":"invalid_cell_value","required":["actual_value","column_name","example","parse_error"],"properties":{"actual_value":{"$ref":"#/components/schemas/std.string.String"},"column_name":{"$ref":"#/components/schemas/std.string.String"},"example":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"parse_error":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"invalid_column_name","required":["invalid_column_name"],"properties":{"invalid_column_name":{"type":"object","title":"invalid_column_name","required":["column_name","example"],"properties":{"column_name":{"$ref":"#/components/schemas/std.string.String"},"example":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"unhandled_deserialization_error","required":["unhandled_deserialization_error"],"properties":{"unhandled_deserialization_error":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"invalid_utf8_in_field"},{"type":"object","title":"too_many_rows","required":["too_many_rows"],"properties":{"too_many_rows":{"type":"object","title":"too_many_rows","required":["actual_value","max_value"],"properties":{"actual_value":{"$ref":"#/components/schemas/u64"},"max_value":{"$ref":"#/components/schemas/u64"}}}}},{"type":"object","title":"invalid_url","required":["invalid_url"],"properties":{"invalid_url":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"too_many_images","required":["too_many_images"],"properties":{"too_many_images":{"type":"object","title":"too_many_images","required":["actual_value","max_value"],"properties":{"actual_value":{"$ref":"#/components/schemas/u64"},"max_value":{"$ref":"#/components/schemas/u64"}}}}},{"type":"object","title":"invalid_part_attribute_value","required":["invalid_part_attribute_value"],"properties":{"invalid_part_attribute_value":{"type":"object","title":"invalid_part_attribute_value","required":["column_name","examples","expected_type"],"properties":{"column_name":{"$ref":"#/components/schemas/std.string.String"},"examples":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"expected_type":{"$ref":"#/components/schemas/ingest.GapcAttributeType"}}}}},{"type":"object","title":"invalid_part_attribute_value_unit_of_measure","required":["invalid_part_attribute_value_unit_of_measure"],"properties":{"invalid_part_attribute_value_unit_of_measure":{"type":"object","title":"invalid_part_attribute_value_unit_of_measure","required":["accepted_unit_of_measures","column_name","provided_unit_of_measure"],"properties":{"accepted_unit_of_measures":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"}},"column_name":{"$ref":"#/components/schemas/std.string.String"},"provided_unit_of_measure":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"xml_tag_text_is_invalid","required":["xml_tag_text_is_invalid"],"properties":{"xml_tag_text_is_invalid":{"type":"object","title":"xml_tag_text_is_invalid","required":["examples","provided_value","tag_name"],"properties":{"examples":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"provided_value":{"$ref":"#/components/schemas/std.string.String"},"tag_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"xml_tag_text_must_be_numeric","required":["xml_tag_text_must_be_numeric"],"properties":{"xml_tag_text_must_be_numeric":{"type":"object","title":"xml_tag_text_must_be_numeric","required":["provided_value","tag_name"],"properties":{"provided_value":{"$ref":"#/components/schemas/std.string.String"},"tag_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"xml_tag_text_is_missing","required":["xml_tag_text_is_missing"],"properties":{"xml_tag_text_is_missing":{"type":"object","title":"xml_tag_text_is_missing","required":["examples","tag_name"],"properties":{"examples":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"tag_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"xml_tag_attribute_is_invalid","required":["xml_tag_attribute_is_invalid"],"properties":{"xml_tag_attribute_is_invalid":{"type":"object","title":"xml_tag_attribute_is_invalid","required":["attribute_name","examples","provided_value","tag_name"],"properties":{"attribute_name":{"$ref":"#/components/schemas/std.string.String"},"examples":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"provided_value":{"$ref":"#/components/schemas/std.string.String"},"tag_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"xml_tag_attribute_must_be_numeric","required":["xml_tag_attribute_must_be_numeric"],"properties":{"xml_tag_attribute_must_be_numeric":{"type":"object","title":"xml_tag_attribute_must_be_numeric","required":["attribute_name","provided_value","tag_name"],"properties":{"attribute_name":{"$ref":"#/components/schemas/std.string.String"},"provided_value":{"$ref":"#/components/schemas/std.string.String"},"tag_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"xml_tag_attribute_is_missing","required":["xml_tag_attribute_is_missing"],"properties":{"xml_tag_attribute_is_missing":{"type":"object","title":"xml_tag_attribute_is_missing","required":["attribute_name","examples","tag_name"],"properties":{"attribute_name":{"$ref":"#/components/schemas/std.string.String"},"examples":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"tag_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"aces_multiple_headers"},{"const":"aces_app_has_no_id"},{"type":"object","title":"aces_app_id_is_not_unique","required":["aces_app_id_is_not_unique"],"properties":{"aces_app_id_is_not_unique":{"type":"object","title":"aces_app_id_is_not_unique","required":["app_id"],"properties":{"app_id":{"$ref":"#/components/schemas/i32"}}}}},{"type":"object","title":"aces_missing_end_tag","required":["aces_missing_end_tag"],"properties":{"aces_missing_end_tag":{"type":"object","title":"aces_missing_end_tag","required":["tag_name"],"properties":{"tag_name":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"aces_app_invalid_action","required":["aces_app_invalid_action"],"properties":{"aces_app_invalid_action":{"type":"object","title":"aces_app_invalid_action","required":["app_id"],"properties":{"app_id":{"$ref":"#/components/schemas/i32"}}}}},{"type":"object","title":"aces_app_missing_vehicle_identity","required":["aces_app_missing_vehicle_identity"],"properties":{"aces_app_missing_vehicle_identity":{"type":"object","title":"aces_app_missing_vehicle_identity","required":["app_id"],"properties":{"app_id":{"$ref":"#/components/schemas/i32"}}}}}]},"ingest.FileInsertRequest":{"type":"object","title":"ingest.FileInsertRequest","required":["file_path"],"properties":{"data_origin":{"description":"Optional scope label for imported data, for example supplier/OEM source name.\nThis is the complete feed schema for one logical source: `Origin = IdentityColumns ∪ DataColumns`.\nUsed by data-ingestor at insert time to resolve and persist the previous file when `prev_file_path` is not provided.\nCandidates are scanned from newest to oldest by created_at within the same store.\nExhausted failed candidates are skipped before any opposite-scope or same-stream decision.\nA discovered previous file used for differential ingest must have completed `file_ingestor` stage.\nIf the newest same-scope candidate is still waiting to be processed,\n`file-imports.insert` fails with `422 prev_file_ingest_not_completed`.\nIf the newest completed same-origin candidate has opposite scope shape,\ninsert persists no previous file and ingest runs as ordinary ingest.\nIf no previous file is discovered, ingest runs as ordinary ingest.\nIf previous file is discovered but current CSV header has both key strategies or neither key strategy,\nfile-ingestor records a header issue and marks file processing with an error.\nReingesting same rows without `data_origin` writes null into products `data_origin`.\nReingesting same rows with a different `data_origin` writes the new value into products `data_origin`.\nOmitting `data_origin` disables this scope-based lookup and does not link to previous files from origin scopes.\nThis value is separate from `data_source`, which is system-derived from ingest source metadata.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"data_stream":{"description":"Optional subset label inside `data_origin` scope, for example prices/stock/fitment stream.\nRequires `data_origin`.\nEvery stream must contain all identity columns and only a subset of the origin data columns.\nIdentity columns may overlap across streams, but data columns must be disjoint.\nPractical rule: streams share keys, but not payload.\nCannot be combined with `row_reconcile_policy=delete_origin_except_source`.\nTogether with `data_origin`, defines the scope used for insert-time previous-file resolution.\nLookup is symmetric by scope shape:\n- current `data_stream = null` matches only previous `data_stream = null`.\n- current `data_stream = \"prices\"` can diff only against previous `data_stream = \"prices\"`.\n- if the latest same-origin ingest overall has opposite scope shape\n(`prev.data_stream = null` vs non-null relative to current),\nthe newest queued same-origin candidate causes ordinary-ingest fallback instead of searching older same-scope history.\nIf no valid file is resolved for this scope, ingest runs as ordinary ingest.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"file_path":{"description":"Registers an uploaded async import file.\nSellable CSV rows may include `AssembledInto` to manage assembly hierarchy:\nnon-empty values are treated as parent sellable identities (SKU or UUID),\nexplicit `null` clears the current parent assembly link,\nand clear cascades to descendants in the detached sub-assembly chain,\nand empty or omitted values leave the current assembly link unchanged.\nWhen a non-empty `AssembledInto` value is used, the parent sellable must already exist\nor appear earlier in the same file.\nPath to uploaded file in object storage.\nMust include a valid UTF-8 file name segment (for example `.../file.csv`).\nPaths that end with `/` or have a non-UTF-8 file name are rejected with `422`.","$ref":"#/components/schemas/std.string.String"},"ignore_data_columns_header_diff":{"description":"Optional differential-ingest override for CSV files whose data columns changed between snapshots.\nWhen `true`, file-ingestor ignores header differences outside the identity key columns and skips\nbyte-for-byte row comparison for matched keys, treating them as changed rows.\nBoth the current and previous file must still contain exactly one identity strategy:\n`Sku`, or full composite key headers (`Brand`, `PartNumber`, `CrossReferenceBrand`, `CrossReferencePartNumbers`).\nRequires either `prev_file_path` or `data_origin` so a previous file can be resolved.\nCannot be combined with `row_reconcile_policy=keep_all` or `row_reconcile_policy=delete_origin_except_source`.","$ref":"#/components/schemas/bool"},"missing_row_defaults":{"description":"Required when `row_reconcile_policy=reset_missing_row_defaults`.\nA flat mapping of column names to their default values for rows missing from the current file.\nValues must be scalar (string, number, boolean, or null); objects and arrays are rejected.\nCannot be provided with any other `row_reconcile_policy`.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prev_file_path":{"description":"Optional explicit path to a previous file from the same store.\nData-ingestor resolves this path at insert time and persists the exact previous file id used later by file-ingestor.\nDifferential ingest for CSV requires either `Sku` header or full composite key headers:\n`Brand`, `PartNumber`, `CrossReferenceBrand`, `CrossReferencePartNumbers`.\nIf both strategies are present, or neither strategy is present, file-ingestor records a header issue\nand marks file processing with an error.\nThe resolved file must exist in the same store and must have completed `file_ingestor` stage.\nMutually exclusive with `data_origin`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"row_reconcile_policy":{"description":"Optional row reconciliation policy for differential ingest.\n`delete_prev_except_current` and `keep_all` are applied only when differential ingest prerequisites are met.\nCSV has exactly one key strategy: `Sku`, or full composite key headers\n(`Brand`, `PartNumber`, `CrossReferenceBrand`, `CrossReferencePartNumbers`).\nIf key strategy validation fails during processing, previous-row reconciliation does not run.\n`delete_origin_except_source` is valid only for origin-only ingests: `data_origin` is required and `data_stream` must be omitted.\nIt always runs origin reconciliation in data-ingestor after current-file rows are processed.\nFor this policy, file-ingestor may intentionally fall back to ordinary ingest row processing to preserve unchanged source rows.\n\n- `count_items_deleted` counts only sellable rows removed by reconciliation policies.\nOrdinary ingest `remove` rows do not change the counter.\nIf file processing removes a parent assembly sellable, data-ingestor may recursively remove linked sub-assembly sellables,\nbut those cascaded child deletions are not added to the counter.\nCleanup of tags, uploads, inventories, and groupings is not counted.\n- `delete_prev_except_current` (default): remove rows that existed in previous file but are missing in current file.\n- `delete_origin_except_source`: after ingesting current file, data-ingestor deletes rows in the same\n`(store_id, data_origin)` that were not written by current source feed (`data_source_feed_id IS DISTINCT FROM current feed`).\nRequires `data_origin` and rejects requests that also provide `data_stream`.\n- `keep_all`: keep missing rows unchanged.\n- `reset_missing_row_defaults`: for rows that existed in the previous file but are missing in the current file,\nreset the columns specified in `missing_row_defaults` to their provided default values instead of deleting the rows.\nRequires `missing_row_defaults`.","$ref":"#/components/schemas/ingest.FileImportRowReconcilePolicy"}}},"ingest.FileInsertResponse":{"type":"object","title":"ingest.FileInsertResponse","required":["file_path"],"properties":{"file_path":{"$ref":"#/components/schemas/std.string.String"}}},"ingest.GapcAttributeIdentity":{"oneOf":[{"description":"**Id** in `UUID` format","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Name of a GAPC attribute","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.GapcAttributeType":{"oneOf":[{"const":"boolean"},{"const":"string"},{"const":"option"},{"const":"numeric"},{"const":"numeric_range"},{"const":"date"}]},"ingest.GapcBrandIdentity":{"oneOf":[{"description":"Partly brand suid (e.g. `GBRN100`)","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Partly normalized or entity resolutions resolvable name\nwithout relying on external brand identity source type","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"External brand identifier + it's source type.\nAlso resolved via entity resolutions mapping table.","type":"object","title":"external","required":["external"],"properties":{"external":{"$ref":"#/components/schemas/ingest.ExternalBrandIdentity"}}}]},"ingest.GapcPartAttributeData":{"type":"object","title":"ingest.GapcPartAttributeData","required":["value"],"properties":{"qualifier":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartAttributeQualifier"}]},"value":{"$ref":"#/components/schemas/lookup.GapcPartAttributeValue"}}},"ingest.GapcPartAttributeIdentity":{"oneOf":[{"description":"within a part","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"including mapped via entity resolutions","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.GapcPartAttributeIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"attribute_does_not_exist","required":["attribute_does_not_exist"],"properties":{"attribute_does_not_exist":{"$ref":"#/components/schemas/ingest.GapcAttributeIdentity"}}},{"type":"object","title":"attribute_option_does_not_exist","required":["attribute_option_does_not_exist"],"properties":{"attribute_option_does_not_exist":{"$ref":"#/components/schemas/lookup.GapcAttributeOptionIdentity"}}},{"type":"object","title":"attribute_data_type_mismatch","required":["attribute_data_type_mismatch"],"properties":{"attribute_data_type_mismatch":{"type":"object","title":"attribute_data_type_mismatch","required":["expected_type","provided_type"],"properties":{"expected_type":{"$ref":"#/components/schemas/ingest.GapcAttributeType"},"provided_type":{"$ref":"#/components/schemas/ingest.GapcAttributeType"}}}}}]},"ingest.GapcPartData":{"type":"object","title":"ingest.GapcPartData","properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"fitment_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gtin14":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"height_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"is_performance":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_universal":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"length_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"original_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"packing_unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"part_position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.GapcPartPositionIdentity"}]},"part_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.GapcPartTypeIdentity"}]},"quantity_per_packing_unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]},"weight_g":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"width_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"ingest.GapcPartEmbeddedRelationType":{"oneOf":[{"const":"attribute"},{"const":"inheritance"}]},"ingest.GapcPartFitmentData":{"type":"object","title":"ingest.GapcPartFitmentData","properties":{"fitment_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"qualifier":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartFitmentQualifier"}]}}},"ingest.GapcPartFitmentIdentity":{"type":"object","title":"ingest.GapcPartFitmentIdentity","required":["part_position","vehicle_definition","vehicle_restrictions"],"properties":{"part_position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.GapcPartPositionIdentity"}]},"vehicle_definition":{"$ref":"#/components/schemas/ingest.UvdbVehicleDefinitionIdentity"},"vehicle_restrictions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.UvdbVehiclePropertyIdentity"}}}},"ingest.GapcPartFitmentIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"gapc_part_position_does_not_exist","required":["gapc_part_position_does_not_exist"],"properties":{"gapc_part_position_does_not_exist":{"$ref":"#/components/schemas/ingest.GapcPartPositionIdentity"}}},{"type":"object","title":"invalid_vehicle_definition_suid","required":["invalid_vehicle_definition_suid"],"properties":{"invalid_vehicle_definition_suid":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_external_vehicle_definition_identity","required":["invalid_external_vehicle_definition_identity"],"properties":{"invalid_external_vehicle_definition_identity":{"$ref":"#/components/schemas/ingest.ExternalVehicleDefinitionIdentity"}}},{"type":"object","title":"invalid_vehicle_restriction_prefix","required":["invalid_vehicle_restriction_prefix"],"properties":{"invalid_vehicle_restriction_prefix":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"vehicle_restriction_property_does_not_exist","required":["vehicle_restriction_property_does_not_exist"],"properties":{"vehicle_restriction_property_does_not_exist":{"$ref":"#/components/schemas/ingest.UvdbVehiclePropertyIdentity"}}},{"type":"object","title":"vehicle_restriction_property_not_applicable","required":["vehicle_restriction_property_not_applicable"],"properties":{"vehicle_restriction_property_not_applicable":{"type":"object","title":"vehicle_restriction_property_not_applicable","required":["context","property_id"],"properties":{"context":{"$ref":"#/components/schemas/std.string.String"},"property_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"ingest.GapcPartIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"}]},"ingest.GapcPartIdentityOnInsert":{"oneOf":[{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"}]},"ingest.GapcPartInheritanceData":{"type":"object","title":"ingest.GapcPartInheritanceData","properties":{"inheritance_mode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.CandidateInheritanceMode"}]}}},"ingest.GapcPartInheritanceIdentity":{"oneOf":[{"type":"object","title":"id","required":["parent_part_id","parent_store_id"],"properties":{"parent_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parent_store_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"name","required":["parent_brand","parent_mpn","parent_stores"],"properties":{"parent_brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.GapcBrandIdentity"}]},"parent_mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parent_stores":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.StoreIdentity"}}}}]},"ingest.GapcPartInheritanceIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_parent_mpn","required":["invalid_parent_mpn"],"properties":{"invalid_parent_mpn":{"type":"object","title":"invalid_parent_mpn","required":["mpn"],"properties":{"mpn":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"gapc_brand_does_not_exist","required":["gapc_brand_does_not_exist"],"properties":{"gapc_brand_does_not_exist":{"type":"object","title":"gapc_brand_does_not_exist","required":["brand_identity"],"properties":{"ambiguous":{"$ref":"#/components/schemas/bool"},"brand_identity":{"$ref":"#/components/schemas/ingest.GapcBrandIdentity"}}}}},{"type":"object","title":"store_not_inheritable","required":["store_not_inheritable"],"properties":{"store_not_inheritable":{"$ref":"#/components/schemas/ingest.StoreIdentity"}}},{"type":"object","title":"unable_to_inherit_from_own_store","required":["unable_to_inherit_from_own_store"],"properties":{"unable_to_inherit_from_own_store":{"$ref":"#/components/schemas/ingest.StoreIdentity"}}},{"type":"object","title":"part_has_too_many_parents","required":["part_has_too_many_parents"],"properties":{"part_has_too_many_parents":{"type":"object","title":"part_has_too_many_parents","required":["actual_parents","max_parents"],"properties":{"actual_parents":{"$ref":"#/components/schemas/usize"},"max_parents":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"parent_part_not_found","required":["parent_part_not_found"],"properties":{"parent_part_not_found":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"}}},{"type":"object","title":"parent_part_archived","required":["parent_part_archived"],"properties":{"parent_part_archived":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"}}},{"type":"object","title":"parent_part_brand_does_not_exist","required":["parent_part_brand_does_not_exist"],"properties":{"parent_part_brand_does_not_exist":{"$ref":"#/components/schemas/ingest.GapcBrandIdentity"}}},{"type":"object","title":"parent_store_does_not_exist","required":["parent_store_does_not_exist"],"properties":{"parent_store_does_not_exist":{"$ref":"#/components/schemas/ingest.StoreIdentity"}}},{"type":"object","title":"parent_part_stale_edition","required":["parent_part_stale_edition"],"properties":{"parent_part_stale_edition":{"type":"object","title":"parent_part_stale_edition","required":["latest_edition","provided_edition"],"properties":{"latest_edition":{"$ref":"#/components/schemas/i32"},"provided_edition":{"$ref":"#/components/schemas/i32"}}}}},{"type":"object","title":"invalid_parent_part_edition","required":["invalid_parent_part_edition"],"properties":{"invalid_parent_part_edition":{"type":"object","title":"invalid_parent_part_edition","required":["provided_edition"],"properties":{"provided_edition":{"$ref":"#/components/schemas/i32"}}}}}]},"ingest.GapcPartInterchangeData":{"type":"object","title":"ingest.GapcPartInterchangeData","properties":{"group_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"qualifier":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartInterchangeQualifier"}]},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]}}},"ingest.GapcPartInterchangeIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"gapc_brand_does_not_exist","required":["gapc_brand_does_not_exist"],"properties":{"gapc_brand_does_not_exist":{"type":"object","title":"gapc_brand_does_not_exist","required":["brand_identity"],"properties":{"ambiguous":{"$ref":"#/components/schemas/bool"},"brand_identity":{"$ref":"#/components/schemas/ingest.GapcBrandIdentity"}}}}},{"type":"object","title":"invalid_interchange_mpn","required":["invalid_interchange_mpn"],"properties":{"invalid_interchange_mpn":{"type":"object","title":"invalid_interchange_mpn","required":["mpn"],"properties":{"mpn":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"interchange_brand_does_not_exist","required":["interchange_brand_does_not_exist"],"properties":{"interchange_brand_does_not_exist":{"$ref":"#/components/schemas/ingest.GapcBrandIdentity"}}}]},"ingest.GapcPartIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"type":"object","title":"entity_edition_does_not_match","required":["entity_edition_does_not_match"],"properties":{"entity_edition_does_not_match":{"type":"object","title":"entity_edition_does_not_match","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}},{"const":"rolled_back_due_to_atomicity"},{"type":"object","title":"max_character_length_exceeded","required":["max_character_length_exceeded"],"properties":{"max_character_length_exceeded":{"type":"object","title":"max_character_length_exceeded","required":["field_name","max_length"],"properties":{"field_name":{"$ref":"#/components/schemas/std.string.String"},"max_length":{"$ref":"#/components/schemas/usize"}}}}},{"const":"detected_concurrent_update"},{"const":"operation_not_supported","description":"The requested operation is not supported for this entity type.\nUsed to reject deprecated Archive/Unarchive operations on gapc parts."},{"type":"object","title":"invalid_mpn","required":["invalid_mpn"],"properties":{"invalid_mpn":{"type":"object","title":"invalid_mpn","required":["mpn"],"properties":{"mpn":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"mpn_too_long","required":["mpn_too_long"],"properties":{"mpn_too_long":{"type":"object","title":"mpn_too_long","required":["mpn"],"properties":{"mpn":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_width","required":["invalid_width"],"properties":{"invalid_width":{"type":"object","title":"invalid_width","required":["width_mm"],"properties":{"width_mm":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"invalid_length","required":["invalid_length"],"properties":{"invalid_length":{"type":"object","title":"invalid_length","required":["length_mm"],"properties":{"length_mm":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"invalid_height","required":["invalid_height"],"properties":{"invalid_height":{"type":"object","title":"invalid_height","required":["height_mm"],"properties":{"height_mm":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"invalid_weight","required":["invalid_weight"],"properties":{"invalid_weight":{"type":"object","title":"invalid_weight","required":["weight_g"],"properties":{"weight_g":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"invalid_packing_unit","required":["invalid_packing_unit"],"properties":{"invalid_packing_unit":{"type":"object","title":"invalid_packing_unit","required":["packing_unit"],"properties":{"packing_unit":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"invalid_quantity_per_packing_unit","required":["invalid_quantity_per_packing_unit"],"properties":{"invalid_quantity_per_packing_unit":{"type":"object","title":"invalid_quantity_per_packing_unit","required":["quantity_per_packing_unit"],"properties":{"quantity_per_packing_unit":{"$ref":"#/components/schemas/u8"}}}}},{"const":"gapc_part_is_not_archived"},{"const":"gapc_part_is_not_archived_long_enough"},{"type":"object","title":"gapc_brand_does_not_exist","required":["gapc_brand_does_not_exist"],"properties":{"gapc_brand_does_not_exist":{"type":"object","title":"gapc_brand_does_not_exist","required":["brand_identity"],"properties":{"ambiguous":{"$ref":"#/components/schemas/bool"},"brand_identity":{"$ref":"#/components/schemas/ingest.GapcBrandIdentity"}}}}},{"type":"object","title":"gapc_part_type_does_not_exist","required":["gapc_part_type_does_not_exist"],"properties":{"gapc_part_type_does_not_exist":{"$ref":"#/components/schemas/ingest.GapcPartTypeIdentity"}}},{"type":"object","title":"gapc_part_position_does_not_exist","required":["gapc_part_position_does_not_exist"],"properties":{"gapc_part_position_does_not_exist":{"$ref":"#/components/schemas/ingest.GapcPartPositionIdentity"}}},{"type":"object","title":"failed_to_remove_part_fitments","required":["failed_to_remove_part_fitments"],"properties":{"failed_to_remove_part_fitments":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIssue"}}},{"type":"object","title":"failed_to_remove_part_attributes","required":["failed_to_remove_part_attributes"],"properties":{"failed_to_remove_part_attributes":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIssue"}}},{"type":"object","title":"failed_to_remove_part_interchanges","required":["failed_to_remove_part_interchanges"],"properties":{"failed_to_remove_part_interchanges":{"$ref":"#/components/schemas/ingest.GapcPartInterchangeIssue"}}},{"type":"object","title":"part_is_referenced_by_sellables","required":["part_is_referenced_by_sellables"],"properties":{"part_is_referenced_by_sellables":{"type":"object","title":"part_is_referenced_by_sellables","required":["sellable_skus"],"properties":{"sellable_skus":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"store_does_not_exist","required":["store_does_not_exist"],"properties":{"store_does_not_exist":{"$ref":"#/components/schemas/ingest.StoreIdentity"}}},{"type":"object","title":"too_many_part_relations","required":["too_many_part_relations"],"properties":{"too_many_part_relations":{"type":"object","title":"too_many_part_relations","required":["actual_count","max_count","relation_type"],"properties":{"actual_count":{"$ref":"#/components/schemas/u64"},"max_count":{"$ref":"#/components/schemas/u64"},"relation_type":{"$ref":"#/components/schemas/ingest.GapcPartEmbeddedRelationType"}}}}}]},"ingest.GapcPartPositionIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Named position, example \"front left\"","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"external","required":["external"],"properties":{"external":{"$ref":"#/components/schemas/ingest.ExternalPartPositionIdentity"}}}]},"ingest.GapcPartTypeIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Partly normalized or entity resolutions resolvable name","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"external","required":["external"],"properties":{"external":{"$ref":"#/components/schemas/ingest.ExternalPartTypeIdentity"}}}]},"ingest.GetFileIssuesRequest":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"type":"object","title":"ingest.GetFileIssuesRequest","required":["file_id"],"properties":{"file_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"ingest.GetFileRequest":{"type":"object","title":"ingest.GetFileRequest","required":["file_id"],"properties":{"file_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"ingest.IngestAsyncSellable":{"type":"object","title":"ingest.IngestAsyncSellable","required":["entity"],"properties":{"entity":{"description":"Sellable data for ingesting","oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableData"},{"type":"object","title":"IdentityData<ingest.SellableIdentityOnInsert, ingest.SellableData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentityOnInsert"}}}]},{"type":"object","title":"nomatches.InsertWithCondition<IdentityData<ingest.SellableIdentityOnInsert, ingest.SellableData>, IfExistsOnIngestInsertIdempotent>","required":["if"],"properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsertRequired<IfExistsOnIngestInsertIdempotent>","required":["exists"],"properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsertIdempotent"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableData"},{"type":"object","title":"IdentityData<ingest.SellableIdentityOnInsert, ingest.SellableData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentityOnInsert"}}}]},{"type":"object","title":"nomatches.Update<IdentityData<ingest.SellableIdentityOnInsert, ingest.SellableData>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableIdentityOnInsert>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentityOnInsert"}}},{"type":"object","title":"nomatches.Remove<Identity<ingest.SellableIdentityOnInsert>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"archive"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableIdentityOnInsert>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentityOnInsert"}}},{"type":"object","title":"nomatches.Update<Identity<ingest.SellableIdentityOnInsert>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"unarchive"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableIdentityOnInsert>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentityOnInsert"}}},{"type":"object","title":"nomatches.Remove<Identity<ingest.SellableIdentityOnInsert>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]},"groupings":{"description":"Sellable groupings","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableGroupingData"},{"type":"object","title":"IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}}]},{"type":"object","title":"nomatches.InsertWithCondition<IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>, IfExistsOnIngestInsertIdempotent>","required":["if"],"properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsertRequired<IfExistsOnIngestInsertIdempotent>","required":["exists"],"properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsertIdempotent"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableGroupingData"},{"type":"object","title":"IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}}]},{"type":"object","title":"nomatches.Update<IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableGroupingIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}},{"type":"object","title":"nomatches.Remove<Identity<ingest.SellableGroupingIdentity>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"inventories":{"description":"Sellable inventory","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableInventoryData"},{"type":"object","title":"IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}}]},{"type":"object","title":"nomatches.InsertWithCondition<IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>, IfExistsOnIngestInsertIdempotent>","required":["if"],"properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsertRequired<IfExistsOnIngestInsertIdempotent>","required":["exists"],"properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsertIdempotent"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableInventoryData"},{"type":"object","title":"IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}}]},{"type":"object","title":"nomatches.Update<IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableInventoryIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}},{"type":"object","title":"nomatches.Remove<Identity<ingest.SellableInventoryIdentity>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"tags":{"description":"Sellable tags","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableTagData"},{"type":"object","title":"IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"}}}]},{"type":"object","title":"nomatches.InsertWithCondition<IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>, IfExistsOnIngestInsertIdempotent>","required":["if"],"properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsertRequired<IfExistsOnIngestInsertIdempotent>","required":["exists"],"properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsertIdempotent"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableTagData"},{"type":"object","title":"IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"}}}]},{"type":"object","title":"nomatches.Update<IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableTagIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"}}},{"type":"object","title":"nomatches.Remove<Identity<ingest.SellableTagIdentity>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"uploads":{"description":"Sellable uploads (images and other files)","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.UploadData"},{"type":"object","title":"IdentityData<ingest.UploadIdentity, ingest.UploadData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"}}}]},{"type":"object","title":"nomatches.InsertWithCondition<IdentityData<ingest.UploadIdentity, ingest.UploadData>, IfExistsOnIngestInsertIdempotent>","required":["if"],"properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsertRequired<IfExistsOnIngestInsertIdempotent>","required":["exists"],"properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsertIdempotent"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.UploadData"},{"type":"object","title":"IdentityData<ingest.UploadIdentity, ingest.UploadData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"}}}]},{"type":"object","title":"nomatches.Update<IdentityData<ingest.UploadIdentity, ingest.UploadData>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.UploadIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"}}},{"type":"object","title":"nomatches.Remove<Identity<ingest.UploadIdentity>>","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]}}},"ingest.IngestAtomicity":{"oneOf":[{"const":"atomic","description":"The ingestion operation is atomic and will only succeed if all parts succeed."},{"const":"non_atomic","description":"The ingestion operation is non-atomic and may partially succeed."}]},"ingest.IngestConsistency":{"oneOf":[{"const":"immediate_full","description":"Data is immediately available for both lookup and search operations, fully synchronized across all systems."},{"const":"immediate_lookup","description":"Data is immediately available for lookups, ensuring quick access for direct queries."},{"const":"eventual","description":"Deprecated: use `ImmediateLookup` instead. This variant will be removed in a future release."}]},"ingest.IngestErrorResponse":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"unprocessable_entity","required":["unprocessable_entity"],"properties":{"unprocessable_entity":{"$ref":"#/components/schemas/ingest.IngestResult"}}}]},"ingest.IngestGapcPart":{"type":"object","title":"ingest.IngestGapcPart","required":["entity"],"properties":{"attributes":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartAttributeData"},{"type":"object","title":"IdentityData<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartAttributeData"},{"type":"object","title":"IdentityData<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.GapcPartAttributeIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.GapcPartAttributeIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"entity":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartData"},{"type":"object","title":"IdentityData<ingest.GapcPartIdentityOnInsert, ingest.GapcPartData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentityOnInsert"}}}]},{"type":"object","title":"InsertOrElse<IdentityData<ingest.GapcPartIdentityOnInsert, ingest.GapcPartData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"},"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/MatchCondition"}]}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartData"},{"type":"object","title":"IdentityData<ingest.GapcPartIdentity, ingest.GapcPartData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"}}}]},{"type":"object","title":"UpdateOrElse<IdentityData<ingest.GapcPartIdentity, ingest.GapcPartData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.GapcPartIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"}}},{"type":"object","title":"RemoveOrElse<Identity<ingest.GapcPartIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.GapcPartIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"}}},{"type":"object","title":"RemoveOrElse<Identity<ingest.GapcPartIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"archive"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.GapcPartIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"}}},{"type":"object","title":"UpdateOrElse<Identity<ingest.GapcPartIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"unarchive"}}}]}]},"fitments":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartFitmentData"},{"type":"object","title":"IdentityData<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartFitmentData"},{"type":"object","title":"IdentityData<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.GapcPartFitmentIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.GapcPartFitmentIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"inheritances":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartInheritanceData"},{"type":"object","title":"IdentityData<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartInheritanceData"},{"type":"object","title":"IdentityData<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.GapcPartInheritanceIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.GapcPartInheritanceIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"interchanges":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartInterchangeData"},{"type":"object","title":"IdentityData<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.GapcPartInterchangeData"},{"type":"object","title":"IdentityData<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SemanticalGapcPartIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.SemanticalGapcPartIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]}}},"ingest.IngestGapcPartResult":{"type":"object","title":"ingest.IngestGapcPartResult","required":["entity"],"properties":{"attributes":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIdentity"}}}}},{"type":"object","title":"issue<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.GapcPartAttributeIdentity, ingest.GapcPartAttributeIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartAttributeIssue"}}}}}]}},"entity":{"oneOf":[{"type":"object","title":"success<ingest.GapcPartIdentity, ingest.GapcPartIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.GapcPartIdentity, ingest.GapcPartIssue>","required":["identity","next_edition","uuid"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"},"next_edition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"uuid":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}}}},{"type":"object","title":"issue<ingest.GapcPartIdentity, ingest.GapcPartIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.GapcPartIdentity, ingest.GapcPartIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartIssue"}}}}}]},"fitments":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIdentity"}}}}},{"type":"object","title":"issue<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.GapcPartFitmentIdentity, ingest.GapcPartFitmentIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartFitmentIssue"}}}}}]}},"inheritances":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"}}}}},{"type":"object","title":"issue<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.GapcPartInheritanceIdentity, ingest.GapcPartInheritanceIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartInheritanceIssue"}}}}}]}},"interchanges":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"}}}}},{"type":"object","title":"issue<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.SemanticalGapcPartIdentity, ingest.GapcPartInterchangeIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SemanticalGapcPartIdentity"},"issue":{"$ref":"#/components/schemas/ingest.GapcPartInterchangeIssue"}}}}}]}}}},"ingest.IngestIssue":{"oneOf":[{"type":"object","title":"file_ingestor_stage","required":["ingest_stage","issues"],"properties":{"ingest_stage":{"const":"file_ingestor_stage"},"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.FileIngestorIssue"}}}},{"type":"object","title":"data_ingestor_stage","required":["ingest_stage","issues"],"properties":{"ingest_stage":{"const":"data_ingestor_stage"},"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.DataIngestorIssue"}}}}]},"ingest.IngestRequest":{"type":"object","title":"ingest.IngestRequest","properties":{"gapc_parts":{"description":"Gapc parts with/without relations for ingesting","type":"array","items":{"$ref":"#/components/schemas/ingest.IngestGapcPart"}},"options":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.IngestRequestOptions"}]},"sellables":{"description":"Sellables with/without relations for ingesting","type":"array","items":{"$ref":"#/components/schemas/ingest.IngestSellable"}}}},"ingest.IngestRequestOptions":{"type":"object","title":"ingest.IngestRequestOptions","required":["atomicity","consistency"],"properties":{"atomicity":{"$ref":"#/components/schemas/ingest.IngestAtomicity"},"consistency":{"$ref":"#/components/schemas/ingest.IngestConsistency"}}},"ingest.IngestResult":{"type":"object","title":"ingest.IngestResult","properties":{"gapc_parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.IngestGapcPartResult"}},"sellables":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.IngestSellableResult"}}}},"ingest.IngestSellable":{"type":"object","title":"ingest.IngestSellable","required":["entity"],"properties":{"entity":{"description":"Sellable data for ingesting","oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableData"},{"type":"object","title":"IdentityData<ingest.SellableIdentityOnInsert, ingest.SellableData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentityOnInsert"}}}]},{"type":"object","title":"InsertOrElse<IdentityData<ingest.SellableIdentityOnInsert, ingest.SellableData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"},"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/MatchCondition"}]}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableData"},{"type":"object","title":"IdentityData<ingest.SellableIdentity, ingest.SellableData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"}}}]},{"type":"object","title":"UpdateOrElse<IdentityData<ingest.SellableIdentity, ingest.SellableData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"}}},{"type":"object","title":"RemoveOrElse<Identity<ingest.SellableIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"archive"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"}}},{"type":"object","title":"UpdateOrElse<Identity<ingest.SellableIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"unarchive"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"}}},{"type":"object","title":"RemoveOrElse<Identity<ingest.SellableIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"matches":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/EditionMatchCondition"}]},"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]},"groupings":{"description":"Sellable groupings\nDeprecated: This field will be removed in an upcoming release.","deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableGroupingData"},{"type":"object","title":"IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableGroupingData"},{"type":"object","title":"IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.SellableGroupingIdentity, ingest.SellableGroupingData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableGroupingIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.SellableGroupingIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"integrations":{"description":"Sellable integrations","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableIntegrationData"},{"type":"object","title":"IdentityData<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIntegrationIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableIntegrationData"},{"type":"object","title":"IdentityData<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIntegrationIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableIntegrationIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIntegrationIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.SellableIntegrationIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"inventories":{"description":"Sellable inventory","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableInventoryData"},{"type":"object","title":"IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableInventoryData"},{"type":"object","title":"IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.SellableInventoryIdentity, ingest.SellableInventoryData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableInventoryIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.SellableInventoryIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"tags":{"description":"Sellable tags","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableTagData"},{"type":"object","title":"IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.SellableTagData"},{"type":"object","title":"IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.SellableTagIdentity, ingest.SellableTagData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.SellableTagIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.SellableTagIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]},"uploads":{"description":"Sellable uploads (images and other files)","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.UploadData"},{"type":"object","title":"IdentityData<ingest.UploadIdentity, ingest.UploadData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"}}}]},{"type":"object","title":"nomatches.InsertOrElse<IdentityData<ingest.UploadIdentity, ingest.UploadData>, IfExistsOnIngestInsert>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnInsert<IfExistsOnIngestInsert>","properties":{"exists":{"$ref":"#/components/schemas/IfExistsOnIngestInsert"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"insert"}}}]},{"allOf":[{"allOf":[{"$ref":"#/components/schemas/ingest.UploadData"},{"type":"object","title":"IdentityData<ingest.UploadIdentity, ingest.UploadData>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"}}}]},{"type":"object","title":"nomatches.UpdateOrElse<IdentityData<ingest.UploadIdentity, ingest.UploadData>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnUpdate<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"update"}}}]},{"allOf":[{"type":"object","title":"Identity<ingest.UploadIdentity>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"}}},{"type":"object","title":"nomatches.RemoveOrElse<Identity<ingest.UploadIdentity>, IfNotExistsAbortOrIgnore>","properties":{"if":{"type":"object","title":"nomatches.IfConflictOnRemove<IfNotExistsAbortOrIgnore>","properties":{"not_exists":{"$ref":"#/components/schemas/IfNotExistsAbortOrIgnore"}}}}},{"description":"tag object","type":"object","title":"tag","required":["operation"],"properties":{"operation":{"const":"remove"}}}]}]}}]}}},"ingest.IngestSellableResult":{"type":"object","title":"ingest.IngestSellableResult","required":["entity"],"properties":{"entity":{"oneOf":[{"type":"object","title":"success<ingest.SellableIdentity, ingest.SellableIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.SellableIdentity, ingest.SellableIssue>","required":["identity","next_edition","uuid"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"next_edition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"uuid":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}}}},{"type":"object","title":"issue<ingest.SellableIdentity, ingest.SellableIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.SellableIdentity, ingest.SellableIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableIssue"}}}}}]},"groupings":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.SellableGroupingIdentity, ingest.SellableGroupingIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.SellableGroupingIdentity, ingest.SellableGroupingIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}}}},{"type":"object","title":"issue<ingest.SellableGroupingIdentity, ingest.SellableGroupingIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.SellableGroupingIdentity, ingest.SellableGroupingIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableGroupingIssue"}}}}}]}},"integrations":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIntegrationIdentity"}}}}},{"type":"object","title":"issue<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.SellableIntegrationIdentity, ingest.SellableIntegrationIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIntegrationIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableIntegrationIssue"}}}}}]}},"inventories":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.SellableInventoryIdentity, ingest.SellableInventoryIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.SellableInventoryIdentity, ingest.SellableInventoryIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}}}},{"type":"object","title":"issue<ingest.SellableInventoryIdentity, ingest.SellableInventoryIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.SellableInventoryIdentity, ingest.SellableInventoryIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableInventoryIssue"}}}}}]}},"tags":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.SellableTagIdentity, ingest.SellableTagIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.SellableTagIdentity, ingest.SellableTagIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"}}}}},{"type":"object","title":"issue<ingest.SellableTagIdentity, ingest.SellableTagIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.SellableTagIdentity, ingest.SellableTagIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableTagIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableTagIssue"}}}}}]}},"uploads":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"success<ingest.UploadIdentity, ingest.SellableUploadIssue>","required":["success"],"properties":{"success":{"type":"object","title":"success<ingest.UploadIdentity, ingest.SellableUploadIssue>","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"}}}}},{"type":"object","title":"issue<ingest.UploadIdentity, ingest.SellableUploadIssue>","required":["issue"],"properties":{"issue":{"type":"object","title":"issue<ingest.UploadIdentity, ingest.SellableUploadIssue>","required":["identity","issue"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.UploadIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableUploadIssue"}}}}}]}}}},"ingest.PanelUsedConditionGrade":{"oneOf":[{"const":"grade0","description":"Like New"},{"const":"grade_a","description":"Existing damage less than the size of a Credit Card"},{"const":"grade_b","description":"Existing damage less than the size of 2 Credit Cards"},{"const":"grade_c","description":"Existing damage greater than the size of 2 Credit Cards"}]},"ingest.ProductCondition":{"oneOf":[{"const":"new"},{"type":"object","title":"used","required":["used"],"properties":{"used":{"$ref":"#/components/schemas/ingest.UsedConditionGrade"}}}]},"ingest.SellableData":{"type":"object","title":"ingest.SellableData","properties":{"assembled_into":{"description":"Assembly parent of this sellable.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.AssemblyParentIdentity"}]},"associated_hca_id":{"description":"A human centric assembly ID associated with this sellable.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"barcode":{"description":"A sellable barcode","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"condition":{"description":"A sellable condition (used or new)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.ProductCondition"}]},"dealer_price":{"description":"A sellable dealer price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"description":{"description":"A sellable description","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_price":{"description":"A sellable display price. **Notice**: this column is deprecated and has *float* type internally which can lead to loss of precision.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"donor_chassis":{"description":"Normalized or original donor vehicle associated with this sellable.\nThis field will be normalized during ingestion by ensuring upper-case capitalization and removal of hyphens and whitespace chars.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expires_at":{"description":"TTL expiry for this sellable, after which a sweeper will delete the record.\n`null` clears the value.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"gapc_part":{"description":"A reference to the part within a store","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.GapcPartIdentity"}]},"listable":{"description":"A flag whether the sellable listable or not","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"name":{"description":"A sellable name","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"retail_price":{"description":"A sellable retail price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sku":{"description":"A sellable sku","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"description":"A sellable trade price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"wholesale_price":{"description":"A sellable wholesale price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"ingest.SellableEmbeddedRelationType":{"oneOf":[{"const":"tag"},{"const":"upload"},{"const":"inventory"}]},"ingest.SellableGroupingData":{"type":"object","title":"ingest.SellableGroupingData","properties":{}},"ingest.SellableGroupingIdentity":{"oneOf":[{"$ref":"#/components/schemas/ingest.SellableIdentity"}]},"ingest.SellableGroupingIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"failed_to_resolve_sellable","required":["failed_to_resolve_sellable"],"properties":{"failed_to_resolve_sellable":{"$ref":"#/components/schemas/ingest.SellableIssue"}}},{"type":"object","title":"sellable_does_not_exist","required":["sellable_does_not_exist"],"properties":{"sellable_does_not_exist":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"}}},{"type":"object","title":"quantity_too_large","required":["quantity_too_large"],"properties":{"quantity_too_large":{"type":"object","title":"quantity_too_large","required":["actual_value","max_value"],"properties":{"actual_value":{"$ref":"#/components/schemas/u64"},"max_value":{"$ref":"#/components/schemas/u64"}}}}},{"type":"object","title":"min_quantity_is_bigger_than_max_quantity","required":["min_quantity_is_bigger_than_max_quantity"],"properties":{"min_quantity_is_bigger_than_max_quantity":{"type":"object","title":"min_quantity_is_bigger_than_max_quantity","required":["max_quantity","min_quantity"],"properties":{"max_quantity":{"$ref":"#/components/schemas/u32"},"min_quantity":{"$ref":"#/components/schemas/u32"}}}}},{"const":"sellable_is_used_in_kit"},{"type":"object","title":"invalid_sellable_kind","required":["invalid_sellable_kind"],"properties":{"invalid_sellable_kind":{"type":"object","title":"invalid_sellable_kind","required":["actual_kind","target_kind"],"properties":{"actual_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.SellableKind"}]},"target_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.SellableKind"}]}}}}}]},"ingest.SellableIdentity":{"oneOf":[{"description":"**Id** in `UUID` format","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"**Id** in `String` format (SKU)","type":"object","title":"sku","required":["sku"],"properties":{"sku":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"A way for integrations to refer to a sellable using **external id**\nThe data ingestor finds a sellable\nby a combination of an `integration id` from authorization header\nand `external id` from the enum variant.\nIf a request is not coming from an integration,\nthen the response will automatically include `sellable not found` error.","type":"object","title":"external_id","required":["external_id"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.SellableIdentityOnInsert":{"oneOf":[{"description":"**Id** in `String` format (SKU)","type":"object","title":"sku","required":["sku"],"properties":{"sku":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.SellableIntegrationData":{"type":"object","title":"ingest.SellableIntegrationData","properties":{"errors":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.input.SellableIntegrationIssue"}}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"is_sync_required":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"pulled_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"ingest.SellableIntegrationIdentity":{"oneOf":[{"description":"A pointer to the sellable metadata related to the integration\nby a given integration id.","type":"object","title":"integration_id","required":["integration_id"],"properties":{"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"ingest.SellableIntegrationIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"external_id_already_exists"}]},"ingest.SellableInventoryData":{"type":"object","title":"ingest.SellableInventoryData","properties":{"is_backorderable":{"description":"Can be ordered even if quantity is 0 (i.e. available on demand)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"quantity":{"description":"Sellable quantity","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"ingest.SellableInventoryIdentity":{"oneOf":[{"description":"Store address id","type":"object","title":"store_address_id","required":["store_address_id"],"properties":{"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"Store address name","type":"object","title":"store_address_name","required":["store_address_name"],"properties":{"store_address_name":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.SellableInventoryIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"quantity_too_large","required":["quantity_too_large"],"properties":{"quantity_too_large":{"type":"object","title":"quantity_too_large","required":["actual_value","max_value"],"properties":{"actual_value":{"$ref":"#/components/schemas/u64"},"max_value":{"$ref":"#/components/schemas/u64"}}}}},{"type":"object","title":"store_address_does_not_exist","required":["store_address_does_not_exist"],"properties":{"store_address_does_not_exist":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"}}}]},"ingest.SellableIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"type":"object","title":"entity_edition_does_not_match","required":["entity_edition_does_not_match"],"properties":{"entity_edition_does_not_match":{"type":"object","title":"entity_edition_does_not_match","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}},{"const":"skipped_relation_due_to_entity_remove"},{"const":"rolled_back_due_to_atomicity"},{"const":"failed_to_remove_all_relations"},{"type":"object","title":"max_character_length_exceeded","required":["max_character_length_exceeded"],"properties":{"max_character_length_exceeded":{"type":"object","title":"max_character_length_exceeded","required":["field_name","max_length"],"properties":{"field_name":{"$ref":"#/components/schemas/std.string.String"},"max_length":{"$ref":"#/components/schemas/usize"}}}}},{"const":"detected_concurrent_update"},{"const":"number_not_positive"},{"const":"sellable_is_used_in_kit"},{"type":"object","title":"price_should_be_non_negative","required":["price_should_be_non_negative"],"properties":{"price_should_be_non_negative":{"type":"object","title":"price_should_be_non_negative","required":["actual_value"],"properties":{"actual_value":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"gapc_part_does_not_exist","required":["gapc_part_does_not_exist"],"properties":{"gapc_part_does_not_exist":{"$ref":"#/components/schemas/ingest.GapcPartIdentity"}}},{"type":"object","title":"failed_to_remove_sellable_inventories","required":["failed_to_remove_sellable_inventories"],"properties":{"failed_to_remove_sellable_inventories":{"$ref":"#/components/schemas/ingest.SellableInventoryIssue"}}},{"type":"object","title":"failed_to_remove_sellable_groupings","required":["failed_to_remove_sellable_groupings"],"properties":{"failed_to_remove_sellable_groupings":{"$ref":"#/components/schemas/ingest.SellableGroupingIssue"}}},{"type":"object","title":"failed_to_remove_sellable_tags","required":["failed_to_remove_sellable_tags"],"properties":{"failed_to_remove_sellable_tags":{"$ref":"#/components/schemas/ingest.SellableTagIssue"}}},{"type":"object","title":"failed_to_remove_sellable_uploads","required":["failed_to_remove_sellable_uploads"],"properties":{"failed_to_remove_sellable_uploads":{"$ref":"#/components/schemas/ingest.SellableUploadIssue"}}},{"const":"sku_already_exists"},{"type":"object","title":"invalid_mpn","required":["invalid_mpn"],"properties":{"invalid_mpn":{"type":"object","title":"invalid_mpn","required":["mpn"],"properties":{"mpn":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"mpn_too_long","required":["mpn_too_long"],"properties":{"mpn_too_long":{"type":"object","title":"mpn_too_long","required":["mpn"],"properties":{"mpn":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"gapc_brand_does_not_exist","required":["gapc_brand_does_not_exist"],"properties":{"gapc_brand_does_not_exist":{"type":"object","title":"gapc_brand_does_not_exist","required":["brand_identity"],"properties":{"ambiguous":{"$ref":"#/components/schemas/bool"},"brand_identity":{"$ref":"#/components/schemas/ingest.GapcBrandIdentity"}}}}},{"type":"object","title":"store_does_not_exist","required":["store_does_not_exist"],"properties":{"store_does_not_exist":{"$ref":"#/components/schemas/ingest.StoreIdentity"}}},{"type":"object","title":"human_centric_assembly_does_not_exist","required":["human_centric_assembly_does_not_exist"],"properties":{"human_centric_assembly_does_not_exist":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"too_many_relations","required":["too_many_relations"],"properties":{"too_many_relations":{"type":"object","title":"too_many_relations","required":["actual_count","max_count","relation_type"],"properties":{"actual_count":{"$ref":"#/components/schemas/u64"},"max_count":{"$ref":"#/components/schemas/u64"},"relation_type":{"$ref":"#/components/schemas/ingest.SellableEmbeddedRelationType"}}}}},{"const":"unsupported_identity","description":"The identity type is not supported for this operation.\nFor example, `ExternalId` is not supported for Insert on the AlloyDB path."},{"const":"assembly_self_reference","description":"`assembled_into` references the sellable itself."},{"const":"assembly_parent_does_not_exist","description":"Assembly parent was not found in the same organization."},{"const":"assembly_loop_detected","description":"Adding this sellable to the assembly would create a cycle."},{"description":"Assembly depth exceeds the maximum allowed.","type":"object","title":"assembly_depth_exceeded","required":["assembly_depth_exceeded"],"properties":{"assembly_depth_exceeded":{"description":"Assembly depth exceeds the maximum allowed.","type":"object","title":"assembly_depth_exceeded","required":["max_depth"],"properties":{"max_depth":{"$ref":"#/components/schemas/usize"}}}}},{"const":"assembly_organization_mismatch","description":"The parent sellable belongs to a different organization."}]},"ingest.SellableKind":{"oneOf":[{"const":"kit"},{"const":"product"},{"const":"variant"},{"const":"assembly"}]},"ingest.SellableTagData":{"type":"object","title":"ingest.SellableTagData","properties":{"is_internal":{"description":"Flag whether tag is **internal** or not","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"ingest.SellableTagIdentity":{"oneOf":[{"description":"Sellable tag name","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.SellableTagIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.SellableUploadIssue":{"oneOf":[{"const":"item_with_identity_already_exists"},{"const":"item_with_identity_does_not_exist"},{"const":"skipped_relation_due_to_entity_remove"},{"const":"skipped_relation_due_to_entity_issue"},{"const":"rolled_back_due_to_atomicity"},{"const":"replace_all_must_be_for_all_or_nothing"},{"const":"duplicate_relations_in_request"},{"type":"object","title":"conflicting_information","required":["conflicting_information"],"properties":{"conflicting_information":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"upload_relative_order_too_large","required":["upload_relative_order_too_large"],"properties":{"upload_relative_order_too_large":{"type":"object","title":"upload_relative_order_too_large","required":["actual_value","max_value"],"properties":{"actual_value":{"$ref":"#/components/schemas/u64"},"max_value":{"$ref":"#/components/schemas/u64"}}}}},{"type":"object","title":"file_not_uploaded","required":["file_not_uploaded"],"properties":{"file_not_uploaded":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"file_kind_is_not_provided"},{"type":"object","title":"file_not_deleted","required":["file_not_deleted"],"properties":{"file_not_deleted":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_url_schema","required":["invalid_url_schema"],"properties":{"invalid_url_schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"invalid_file_kind","required":["invalid_file_kind"],"properties":{"invalid_file_kind":{"type":"object","title":"invalid_file_kind","required":["actual_value","expected_value"],"properties":{"actual_value":{"$ref":"#/components/schemas/ingest.UploadKind"},"expected_value":{"$ref":"#/components/schemas/ingest.UploadKind"}}}}},{"const":"invalid_image_format"},{"type":"object","title":"unsupported_target_image_format","required":["unsupported_target_image_format"],"properties":{"unsupported_target_image_format":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"file_too_large","required":["file_too_large"],"properties":{"file_too_large":{"type":"object","title":"file_too_large","required":["actual_file_size_bytes","max_file_size_bytes"],"properties":{"actual_file_size_bytes":{"$ref":"#/components/schemas/u64"},"max_file_size_bytes":{"$ref":"#/components/schemas/u64"}}}}}]},"ingest.SellablesIngestAsyncError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"ingest.SellablesIngestAsyncRequest":{"type":"object","title":"ingest.SellablesIngestAsyncRequest","required":["file_import_feed_id","is_last","sellables"],"properties":{"file_import_feed_id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_last":{"$ref":"#/components/schemas/bool"},"sellables":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ingest.IngestAsyncSellable"}}}},"ingest.SemanticalGapcPartIdentity":{"type":"object","title":"ingest.SemanticalGapcPartIdentity","required":["brand","mpn"],"properties":{"brand":{"description":"Brand identifier (can be id like `GBRN100`, name like `Toyota`, or external id like `\"aaia\": \"CWNM\"`)","$ref":"#/components/schemas/ingest.GapcBrandIdentity"},"mpn":{"description":"Normalized or original MPN (ingest will normalize it)","$ref":"#/components/schemas/std.string.String"}}},"ingest.StoreIdentity":{"oneOf":[{"description":"**Id** in `UUID` format","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"Exact match for store name which shares parts, will be probably normalized eventually","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.UploadData":{"description":"\nUploads are images, videos, documents, etc.\n","type":"object","title":"ingest.UploadData","required":["relative_order"],"properties":{"kind":{"description":"Defines what kind of upload it is, eg. image, video, etc.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.UploadKind"}]},"qualifier":{"description":"File qualifier","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.UploadQualifier"}]},"relative_order":{"description":"Relative order in the group","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"source_strategy":{"description":"Defines how the upload should be handled.\nWhen set to `External`, the image is not processed or uploaded to the Partly CDN;\ninstead, the original external URL is used directly.\n\nThis field is not ingested into database. It is used only for performance optiomizations.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ingest.UploadSourceStrategy"}]},"title":{"description":"File title","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"ingest.UploadIdentity":{"oneOf":[{"description":"Original file **url** where it was downloaded from","type":"object","title":"url","required":["url"],"properties":{"url":{"$ref":"#/components/schemas/std.string.String"}}}]},"ingest.UploadKind":{"oneOf":[{"const":"image"},{"const":"video"},{"const":"audio"},{"const":"document"},{"const":"diagram","description":"Partly specific format which describes assembly diagram documents\nwith hotspot coordinates"}]},"ingest.UploadSourceStrategy":{"oneOf":[{"const":"upload","description":"Process the file and upload it to the Partly CDN (default)."},{"const":"external","description":"Use the original external URL directly without processing or storing it in the Partly CDN."}]},"ingest.UsedConditionGrade":{"oneOf":[{"type":"object","title":"panel","required":["panel"],"properties":{"panel":{"$ref":"#/components/schemas/ingest.PanelUsedConditionGrade"}}},{"type":"object","title":"distance_traveled","required":["distance_traveled"],"properties":{"distance_traveled":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"operation_hours","required":["operation_hours"],"properties":{"operation_hours":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"remaining_thickness","required":["remaining_thickness"],"properties":{"remaining_thickness":{"$ref":"#/components/schemas/f64"}}}]},"ingest.UvdbVehicleDefinitionIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"external","required":["external"],"properties":{"external":{"$ref":"#/components/schemas/ingest.ExternalVehicleDefinitionIdentity"}}}]},"ingest.UvdbVehiclePropertyIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"name","required":["name"],"properties":{"name":{"type":"object","title":"name","required":["name","prefix"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"prefix":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"external","required":["external"],"properties":{"external":{"type":"object","title":"external","required":["id","prefix"],"properties":{"id":{"$ref":"#/components/schemas/ingest.ExternalVehiclePropertyIdentity"},"prefix":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"integration.InsertRequest":{"type":"object","title":"integration.InsertRequest","required":["integration_schema_id"],"properties":{"integration_schema_id":{"$ref":"#/components/schemas/std.string.String"},"stage":{"$ref":"#/components/schemas/integration.InsertRequestStage"}}},"integration.InsertRequestStage":{"oneOf":[{"description":"The initial stage of the installation process","type":"object","title":"begin","properties":{"begin":{"description":"The initial stage of the installation process","type":"object","properties":{}}}},{"description":"The user has been redirected to the integration's website and is now being redirected back","type":"object","title":"redirect","required":["redirect"],"properties":{"redirect":{"description":"The user has been redirected to the integration's website and is now being redirected back","type":"object","title":"redirect","required":["parameters","session_id","step_name"],"properties":{"parameters":{"$ref":"#/components/schemas/serde_json.Value"},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"step_name":{"$ref":"#/components/schemas/std.string.String"},"system_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"step","required":["step"],"properties":{"step":{"type":"object","title":"step","required":["parameters","session_id","step_name","step_parameters"],"properties":{"parameters":{"$ref":"#/components/schemas/serde_json.Value"},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"step_name":{"$ref":"#/components/schemas/std.string.String"},"step_parameters":{"$ref":"#/components/schemas/serde_json.Value"},"system_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}}]},"integration.InsertResponse":{"oneOf":[{"type":"object","title":"done","required":["integration","stage"],"properties":{"integration":{"$ref":"#/components/schemas/integration.Integration"},"stage":{"const":"done"}}},{"description":"The user needs to be redirected to the url below to continue.","type":"object","title":"redirect","required":["next_step_name","parameters","session_id","stage","system_state","title","url"],"properties":{"message":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"next_step_name":{"description":"The name of the next step to continue the installation process","$ref":"#/components/schemas/std.string.String"},"parameters":{"$ref":"#/components/schemas/serde_json.Value"},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"stage":{"const":"redirect"},"system_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"title":{"$ref":"#/components/schemas/std.string.String"},"url":{"description":"The URL to redirect the user to","$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"step","required":["next_step_name","parameters","session_id","stage","step_schema","system_state"],"properties":{"message":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"next_step_name":{"$ref":"#/components/schemas/std.string.String"},"parameters":{"$ref":"#/components/schemas/serde_json.Value"},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"stage":{"const":"step"},"step_parameters":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"step_schema":{"$ref":"#/components/schemas/serde_json.Value"},"system_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"integration.Integration":{"type":"object","title":"integration.Integration","required":["business_id","created_at","deleted_at","external_id","id","integration_schema","oauth_scopes","organization_id","parameters","secrets","subscriber_store_url","subscriber_url","updated_at"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"integration_schema":{"$ref":"#/components/schemas/integration.IntegrationSchema"},"oauth_scopes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.OAuthIntegrationScope"}},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parameters":{"$ref":"#/components/schemas/serde_json.Value"},"secrets":{"description":"Only provided in the case that the integration calls integrations.get on itself","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"subscriber_store_url":{"description":"Includes fallback to the integration schema's subscriber_store_url.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"subscriber_url":{"description":"Includes fallback to the integration schema's subscriber_url.\n\nAKA: webhook_url","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"integration.IntegrationError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"integration_schema_not_found","required":["integration_schema_not_found"],"properties":{"integration_schema_not_found":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"integration_not_found","required":["integration_not_found"],"properties":{"integration_not_found":{"$ref":"#/components/schemas/integration.IntegrationIdentity"}}},{"type":"object","title":"unprocessable_entity","required":["unprocessable_entity"],"properties":{"unprocessable_entity":{"$ref":"#/components/schemas/std.string.String"}}}]},"integration.IntegrationIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"external_id","required":["external_id"],"properties":{"external_id":{"type":"object","title":"external_id","required":["external_id","integration_schema_id"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"},"integration_schema_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"integration.IntegrationListResponse":{"type":"object","title":"integration.IntegrationListResponse","required":["integrations","next_cursor"],"properties":{"integrations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/integration.Integration"}},"next_cursor":{"$ref":"#/components/schemas/std.string.String"}}},"integration.IntegrationSchema":{"type":"object","title":"integration.IntegrationSchema","required":["description","id","integration_type","logo_url","name","oauth_authorization_urls","subscriber_store_url","subscriber_url"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/std.string.String"},"integration_type":{"$ref":"#/components/schemas/lookup.IntegrationType"},"logo_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"oauth_authorization_urls":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"subscriber_store_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"subscriber_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"integration.IntegrationSigninError":{"oneOf":[{"const":"not_implemented"},{"const":"not_found"}]},"integration.IntegrationsAuthorizeError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"integration_schema_not_found"},{"const":"invalid_authorization_url"},{"type":"object","title":"invalid_scopes","required":["invalid_scopes"],"properties":{"invalid_scopes":{"description":"Expandable array type","type":"array","items":{"description":"Tuple holding 2 elements","type":"array","prefixItems":[{"$ref":"#/components/schemas/std.string.String"},{"$ref":"#/components/schemas/std.string.String"}]}}}}]},"integration.IntegrationsAuthorizeRequest":{"type":"object","title":"integration.IntegrationsAuthorizeRequest","required":["client_id","redirect_url","scopes","state"],"properties":{"client_id":{"description":"The client ID is the ID of the integration that is being installed. It is semantically identifical to a integration schema ID","$ref":"#/components/schemas/std.string.String"},"redirect_url":{"description":"The redirectURL is an exact URL that the front end will redirect too after this request has generated an access code.\nIt will be compared to the persisted accepted authorization URL's and if its not in the list of accepted URLs then\nIntegrationsOAuthAuthorizeError::InvalidAuthorizationUrl will be returned","$ref":"#/components/schemas/std.string.String"},"scopes":{"description":"The list of scopes the user has authorized being granted to the integration","type":"array","items":{"$ref":"#/components/schemas/lookup.OAuthIntegrationScope"}},"state":{"$ref":"#/components/schemas/std.string.String"}}},"integration.IntegrationsAuthorizeResponse":{"type":"object","title":"integration.IntegrationsAuthorizeResponse","required":["redirect_url"],"properties":{"redirect_url":{"$ref":"#/components/schemas/std.string.String"}}},"integration.IntegrationsInsertV2Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"integration_not_found"},{"const":"o_auth_not_supported_by_integration"},{"const":"invalid_client_secret"},{"const":"invalid_access_code"}]},"integration.IntegrationsInsertV2Request":{"type":"object","title":"integration.IntegrationsInsertV2Request","required":["access_code","client_id","client_secret"],"properties":{"access_code":{"$ref":"#/components/schemas/std.string.String"},"client_id":{"$ref":"#/components/schemas/std.string.String"},"client_secret":{"$ref":"#/components/schemas/std.string.String"}}},"integration.IntegrationsInsertV2Response":{"type":"object","title":"integration.IntegrationsInsertV2Response","required":["api_key","integration_id"],"properties":{"api_key":{"$ref":"#/components/schemas/std.string.String"},"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"integration.IntegrationsSigninV2Error":{"oneOf":[{"const":"not_found"}]},"integration.IntegrationsSigninV2Request":{"type":"object","title":"integration.IntegrationsSigninV2Request","required":["api_key","integration_id"],"properties":{"api_key":{"$ref":"#/components/schemas/std.string.String"},"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"integration.IntegrationsV2SigninResponse":{"type":"object","title":"integration.IntegrationsV2SigninResponse","required":["access_token","integration_schema"],"properties":{"access_token":{"$ref":"#/components/schemas/std.string.String"},"integration_schema":{"$ref":"#/components/schemas/std.string.String"}}},"integration.PublishRequest":{"type":"object","title":"integration.PublishRequest","required":["integration_id"],"properties":{"integration_id":{"description":"The integration to publish to","$ref":"#/components/schemas/uuid.Uuid"},"product_ids":{"description":"Subset of products to publish from, if empty all products are published.\nMaximum length of 10_000 products.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"integration.SigninRequest":{"type":"object","title":"integration.SigninRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/integration.IntegrationIdentity"}}},"integration.UpdateRequest":{"type":"object","title":"integration.UpdateRequest","required":["identity","parameters"],"properties":{"identity":{"$ref":"#/components/schemas/integration.IntegrationIdentity"},"parameters":{"$ref":"#/components/schemas/serde_json.Value"}}},"iso_country.CountryCode":{"oneOf":[{"const":"ABW"},{"const":"AFG"},{"const":"AGO"},{"const":"AIA"},{"const":"ALA"},{"const":"ALB"},{"const":"AND"},{"const":"ARE"},{"const":"ARG"},{"const":"ARM"},{"const":"ASM"},{"const":"ATA"},{"const":"ATF"},{"const":"ATG"},{"const":"AUS"},{"const":"AUT"},{"const":"AZE"},{"const":"BDI"},{"const":"BEL"},{"const":"BEN"},{"const":"BES"},{"const":"BFA"},{"const":"BGD"},{"const":"BGR"},{"const":"BHR"},{"const":"BHS"},{"const":"BIH"},{"const":"BLM"},{"const":"BLR"},{"const":"BLZ"},{"const":"BMU"},{"const":"BOL"},{"const":"BRA"},{"const":"BRB"},{"const":"BRN"},{"const":"BTN"},{"const":"BVT"},{"const":"BWA"},{"const":"CAF"},{"const":"CAN"},{"const":"CCK"},{"const":"CHE"},{"const":"CHL"},{"const":"CHN"},{"const":"CIV"},{"const":"CMR"},{"const":"COD"},{"const":"COG"},{"const":"COK"},{"const":"COL"},{"const":"COM"},{"const":"CPV"},{"const":"CRI"},{"const":"CUB"},{"const":"CUW"},{"const":"CXR"},{"const":"CYM"},{"const":"CYP"},{"const":"CZE"},{"const":"DEU"},{"const":"DJI"},{"const":"DMA"},{"const":"DNK"},{"const":"DOM"},{"const":"DZA"},{"const":"ECU"},{"const":"EGY"},{"const":"ERI"},{"const":"ESH"},{"const":"ESP"},{"const":"EST"},{"const":"ETH"},{"const":"FIN"},{"const":"FJI"},{"const":"FLK"},{"const":"FRA"},{"const":"FRO"},{"const":"FSM"},{"const":"GAB"},{"const":"GBR"},{"const":"GEO"},{"const":"GGY"},{"const":"GHA"},{"const":"GIB"},{"const":"GIN"},{"const":"GLP"},{"const":"GMB"},{"const":"GNB"},{"const":"GNQ"},{"const":"GRC"},{"const":"GRD"},{"const":"GRL"},{"const":"GTM"},{"const":"GUF"},{"const":"GUM"},{"const":"GUY"},{"const":"HKG"},{"const":"HMD"},{"const":"HND"},{"const":"HRV"},{"const":"HTI"},{"const":"HUN"},{"const":"IDN"},{"const":"IMN"},{"const":"IND"},{"const":"IOT"},{"const":"IRL"},{"const":"IRN"},{"const":"IRQ"},{"const":"ISL"},{"const":"ISR"},{"const":"ITA"},{"const":"JAM"},{"const":"JEY"},{"const":"JOR"},{"const":"JPN"},{"const":"KAZ"},{"const":"KEN"},{"const":"KGZ"},{"const":"KHM"},{"const":"KIR"},{"const":"KNA"},{"const":"KOR"},{"const":"KWT"},{"const":"LAO"},{"const":"LBN"},{"const":"LBR"},{"const":"LBY"},{"const":"LCA"},{"const":"LIE"},{"const":"LKA"},{"const":"LSO"},{"const":"LTU"},{"const":"LUX"},{"const":"LVA"},{"const":"MAC"},{"const":"MAF"},{"const":"MAR"},{"const":"MCO"},{"const":"MDA"},{"const":"MDG"},{"const":"MDV"},{"const":"MEX"},{"const":"MHL"},{"const":"MKD"},{"const":"MLI"},{"const":"MLT"},{"const":"MMR"},{"const":"MNE"},{"const":"MNG"},{"const":"MNP"},{"const":"MOZ"},{"const":"MRT"},{"const":"MSR"},{"const":"MTQ"},{"const":"MUS"},{"const":"MWI"},{"const":"MYS"},{"const":"MYT"},{"const":"NAM"},{"const":"NCL"},{"const":"NER"},{"const":"NFK"},{"const":"NGA"},{"const":"NIC"},{"const":"NIU"},{"const":"NLD"},{"const":"NOR"},{"const":"NPL"},{"const":"NRU"},{"const":"NZL"},{"const":"OMN"},{"const":"PAK"},{"const":"PAN"},{"const":"PCN"},{"const":"PER"},{"const":"PHL"},{"const":"PLW"},{"const":"PNG"},{"const":"POL"},{"const":"PRI"},{"const":"PRK"},{"const":"PRT"},{"const":"PRY"},{"const":"PSE"},{"const":"PYF"},{"const":"QAT"},{"const":"REU"},{"const":"ROU"},{"const":"RUS"},{"const":"RWA"},{"const":"SAU"},{"const":"SDN"},{"const":"SEN"},{"const":"SGP"},{"const":"SGS"},{"const":"SHN"},{"const":"SJM"},{"const":"SLB"},{"const":"SLE"},{"const":"SLV"},{"const":"SMR"},{"const":"SOM"},{"const":"SPM"},{"const":"SRB"},{"const":"SSD"},{"const":"STP"},{"const":"SUR"},{"const":"SVK"},{"const":"SVN"},{"const":"SWE"},{"const":"SWZ"},{"const":"SXM"},{"const":"SYC"},{"const":"SYR"},{"const":"TCA"},{"const":"TCD"},{"const":"TGO"},{"const":"THA"},{"const":"TJK"},{"const":"TKL"},{"const":"TKM"},{"const":"TLS"},{"const":"TON"},{"const":"TTO"},{"const":"TUN"},{"const":"TUR"},{"const":"TUV"},{"const":"TWN"},{"const":"TZA"},{"const":"UGA"},{"const":"UKR"},{"const":"UMI"},{"const":"URY"},{"const":"USA"},{"const":"UZB"},{"const":"VAT"},{"const":"VCT"},{"const":"VEN"},{"const":"VGB"},{"const":"VIR"},{"const":"VNM"},{"const":"VUT"},{"const":"WLF"},{"const":"WSM"},{"const":"YEM"},{"const":"ZAF"},{"const":"ZMB"},{"const":"ZWE"}]},"iso_currency.CurrencyCode":{"oneOf":[{"const":"AED"},{"const":"AFN"},{"const":"ALL"},{"const":"AMD"},{"const":"ANG"},{"const":"AOA"},{"const":"ARS"},{"const":"AUD"},{"const":"AWG"},{"const":"AZN"},{"const":"BAM"},{"const":"BBD"},{"const":"BDT"},{"const":"BGN"},{"const":"BHD"},{"const":"BIF"},{"const":"BMD"},{"const":"BND"},{"const":"BOB"},{"const":"BRL"},{"const":"BSD"},{"const":"BTC"},{"const":"BTN"},{"const":"BWP"},{"const":"BYN"},{"const":"BYR"},{"const":"BZD"},{"const":"CAD"},{"const":"CDF"},{"const":"CHF"},{"const":"CLP"},{"const":"CNH"},{"const":"CNY"},{"const":"COP"},{"const":"CRC"},{"const":"CUP"},{"const":"CVE"},{"const":"CZK"},{"const":"DJF"},{"const":"DKK"},{"const":"DOP"},{"const":"DZD"},{"const":"EGP"},{"const":"ERN"},{"const":"ETB"},{"const":"EUR"},{"const":"FJD"},{"const":"FKP"},{"const":"GBP"},{"const":"GEL"},{"const":"GGP"},{"const":"GHC"},{"const":"GHS"},{"const":"GIP"},{"const":"GMD"},{"const":"GNF"},{"const":"GTQ"},{"const":"GYD"},{"const":"HKD"},{"const":"HNL"},{"const":"HRK"},{"const":"HTG"},{"const":"HUF"},{"const":"IDR"},{"const":"ILS"},{"const":"IMP"},{"const":"INR"},{"const":"IQD"},{"const":"IRR"},{"const":"ISK"},{"const":"JEP"},{"const":"JMD"},{"const":"JOD"},{"const":"JPY"},{"const":"KES"},{"const":"KGS"},{"const":"KHR"},{"const":"KMF"},{"const":"KPW"},{"const":"KRW"},{"const":"KWD"},{"const":"KYD"},{"const":"KZT"},{"const":"LAK"},{"const":"LBP"},{"const":"LKR"},{"const":"LRD"},{"const":"LSL"},{"const":"LTL"},{"const":"LVL"},{"const":"LYD"},{"const":"MAD"},{"const":"MDL"},{"const":"MGA"},{"const":"MKD"},{"const":"MMK"},{"const":"MNT"},{"const":"MOP"},{"const":"MRO"},{"const":"MRU"},{"const":"MUR"},{"const":"MVR"},{"const":"MWK"},{"const":"MXN"},{"const":"MYR"},{"const":"MZN"},{"const":"NAD"},{"const":"NGN"},{"const":"NIO"},{"const":"NOK"},{"const":"NPR"},{"const":"NZD"},{"const":"OMR"},{"const":"PAB"},{"const":"PEN"},{"const":"PGK"},{"const":"PHP"},{"const":"PKR"},{"const":"PLN"},{"const":"PYG"},{"const":"QAR"},{"const":"RON"},{"const":"RSD"},{"const":"RUB"},{"const":"RWF"},{"const":"SAR"},{"const":"SBD"},{"const":"SCR"},{"const":"SDG"},{"const":"SEK"},{"const":"SGD"},{"const":"SHP"},{"const":"SLE"},{"const":"SLL"},{"const":"SOS"},{"const":"SRD"},{"const":"SSP"},{"const":"STD"},{"const":"STN"},{"const":"SVC"},{"const":"SYP"},{"const":"SZL"},{"const":"THB"},{"const":"TJS"},{"const":"TMT"},{"const":"TND"},{"const":"TOP"},{"const":"TRL"},{"const":"TRY"},{"const":"TTD"},{"const":"TVD"},{"const":"TWD"},{"const":"TZS"},{"const":"UAH"},{"const":"UGX"},{"const":"USD"},{"const":"UYU"},{"const":"UZS"},{"const":"VEF"},{"const":"VES"},{"const":"VND"},{"const":"VUV"},{"const":"WST"},{"const":"XAF"},{"const":"XCD"},{"const":"XCG"},{"const":"XOF"},{"const":"XPF"},{"const":"YER"},{"const":"ZAR"},{"const":"ZMW"},{"const":"ZWD"},{"const":"ZWG"},{"const":"ZWL"}]},"job.AbsoluteUrl":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/std.string.String"}]},"job.AckState":{"oneOf":[{"const":"unacked"},{"const":"acked"}]},"job.AcknowledgeTarget":{"oneOf":[{"description":"Every open item the caller can see, within the scope.","type":"object","title":"all","required":["type"],"properties":{"scope":{"$ref":"#/components/schemas/job.AttentionScope"},"type":{"const":"all"}}},{"type":"object","title":"specific","required":["item_ids","type"],"properties":{"item_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"type":{"const":"specific"}}}]},"job.AttentionAcknowledgeRequest":{"allOf":[{"$ref":"#/components/schemas/job.AcknowledgeTarget"},{"type":"object","title":"job.AttentionAcknowledgeRequest","properties":{}}]},"job.AttentionAcknowledgeResponse":{"type":"object","title":"job.AttentionAcknowledgeResponse","required":["acknowledged"],"properties":{"acknowledged":{"$ref":"#/components/schemas/i64"}}},"job.AttentionCloseRequest":{"type":"object","title":"job.AttentionCloseRequest","required":["item_ids"],"properties":{"item_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"job.AttentionCloseResponse":{"type":"object","title":"job.AttentionCloseResponse","required":["resolved"],"properties":{"resolved":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.ResolvedItem"}}}},"job.AttentionCountRequest":{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.AttentionScope"}]},{"type":"object","title":"job.AttentionCountRequest","properties":{}}]},"job.AttentionCountResponse":{"type":"object","title":"job.AttentionCountResponse","required":["sites","total","unacked"],"properties":{"sites":{"description":"Only sites holding an open item; oldest-first.","type":"array","items":{"$ref":"#/components/schemas/job.AttentionSiteCount"}},"total":{"description":"Includes acked jobs: acking is not resolving.","$ref":"#/components/schemas/i64"},"unacked":{"$ref":"#/components/schemas/i64"}}},"job.AttentionEntities":{"type":"object","title":"job.AttentionEntities","required":["businesses"],"properties":{"businesses":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/job.BusinessAttrs"}}}},"job.AttentionItem":{"type":"object","title":"job.AttentionItem","required":["acked","created_at","id","job_id","kind","payload"],"properties":{"acked":{"$ref":"#/components/schemas/bool"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/job.JobAttentionKind"},"payload":{"$ref":"#/components/schemas/job.JobAttentionPayload"}}},"job.AttentionItemsListRequest":{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.AttentionScope"}]},{"type":"object","title":"job.AttentionItemsListRequest","properties":{"ack_state":{"description":"Omitted returns both.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.AckState"}]},"job_ids":{"description":"Empty covers every job in scope.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"order":{"$ref":"#/components/schemas/job.AttentionOrder"},"page":{"$ref":"#/components/schemas/PageRequest"}}}]},"job.AttentionItemsListResponse":{"type":"object","title":"job.AttentionItemsListResponse","required":["entities","items","page"],"properties":{"entities":{"$ref":"#/components/schemas/job.AttentionEntities"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AttentionItem"}},"page":{"$ref":"#/components/schemas/ForwardPagination"}}},"job.AttentionOrder":{"oneOf":[{"const":"newest"},{"const":"oldest"}]},"job.AttentionScope":{"oneOf":[{"type":"object","title":"all_permitted_sites","required":["type"],"properties":{"type":{"const":"all_permitted_sites"}}},{"type":"object","title":"sites","required":["site_ids","type"],"properties":{"site_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"type":{"const":"sites"}}}]},"job.AttentionSiteCount":{"type":"object","title":"job.AttentionSiteCount","required":["cancelled","oldest_created_at","removed","site_id","total","unacked"],"properties":{"cancelled":{"$ref":"#/components/schemas/i64"},"oldest_created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"removed":{"$ref":"#/components/schemas/i64"},"site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"total":{"$ref":"#/components/schemas/i64"},"unacked":{"$ref":"#/components/schemas/i64"}}},"job.Basket":{"type":"object","title":"job.Basket","required":["created_at","id","items","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"description":"Id is the item that references a basket","$ref":"#/components/schemas/uuid.Uuid"},"items":{"description":"Items are the selected offers and quantity","type":"array","items":{"$ref":"#/components/schemas/job.BasketItem"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"job.BasketAssessorAction":{"oneOf":[{"description":"Approve is when an assessor approves a part selected by the repairer","type":"object","title":"approve","properties":{"approve":{"description":"Approve is when an assessor approves a part selected by the repairer","type":"object","properties":{}}}},{"description":"Rejected is when an assessor do not approve a part selected by a repairer","type":"object","title":"reject","properties":{"reject":{"description":"Rejected is when an assessor do not approve a part selected by a repairer","type":"object","properties":{}}}}]},"job.BasketItem":{"type":"object","title":"job.BasketItem","required":["id","intent","offer_id","quantity"],"properties":{"id":{"description":"Id for the item just added to the basket","$ref":"#/components/schemas/uuid.Uuid"},"intent":{"description":"Intent corresponds to either the reapairer or the assessor. A repairer has the intent to\nrepair, the assessor has the intent to assess but it can approve, reject or ask for more\ninfo","type":"array","items":{"$ref":"#/components/schemas/job.BasketItemIntent"}},"job_part_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"offer_id":{"description":"Offer id is either custom item that had a offer requested or a sellable from our know\ncatalog","$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"description":"Quantity of parts for a certain offer. E.g: 3 bumpers from Toyota Manukau offer","$ref":"#/components/schemas/u32"}}},"job.BasketItemIntent":{"oneOf":[{"description":"Repair intent exits when a basket is inserted or updated by a repair. The intent is very\nstraight forward, and the note is sometimes to clarify for the assessor why a part was\nselected.","type":"object","title":"repair","required":["repair"],"properties":{"repair":{"description":"Repair intent exits when a basket is inserted or updated by a repair. The intent is very\nstraight forward, and the note is sometimes to clarify for the assessor why a part was\nselected.","type":"object","title":"repair","required":["note"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"description":"Assess intent exists when a basket is inserted or updated by an assessor. The intent can\nhave a few actions that the assessor can take on the part, like approve and reprove.","type":"object","title":"assess","required":["assess"],"properties":{"assess":{"description":"Assess intent exists when a basket is inserted or updated by an assessor. The intent can\nhave a few actions that the assessor can take on the part, like approve and reprove.","type":"object","title":"assess","required":["action","note"],"properties":{"action":{"$ref":"#/components/schemas/job.BasketAssessorAction"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}}]},"job.BasketItemUpdateKind":{"oneOf":[{"type":"object","title":"insert","required":["intent","offer_id","quantity","type"],"properties":{"id":{"description":"Omitted, the server mints one. A colliding id is rejected, never merged.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"intent":{"description":"Intent corresponds to either the reapairer or the assessor. A repairer has the intent to\nrepair, the assessor has the intent to assess but it can approve, reject or ask for more\ninfo","$ref":"#/components/schemas/job.BasketItemIntent"},"job_part_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"offer_id":{"description":"Offer id is either custom item that had a offer requested or a sellable from our know\ncatalog","$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"description":"Quantity of parts for a certain offer. E.g: 3 bumpers from Toyota Manukau offer","$ref":"#/components/schemas/u32"},"type":{"const":"insert"}}},{"type":"object","title":"update","required":["id","type"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"intent":{"description":"Intent corresponds to either the reapairer or the assessor. A repairer has the intent to\nrepair, the assessor has the intent to assess but it can approve, reject or ask for more\ninfo","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.BasketItemIntent"}]},"job_part_ids":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"offer_id":{"description":"Offer id is either custom item that had a offer requested or a sellable from our know\ncatalog","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"quantity":{"description":"Quantity of parts for a certain offer. E.g: 3 bumpers from Toyota Manukau offer","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"type":{"const":"update"}}},{"type":"object","title":"remove","required":["id","type"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"remove"}}}]},"job.BasketsGetRequest":{"type":"object","title":"job.BasketsGetRequest","required":["basket_identity","job_identity"],"properties":{"basket_identity":{"$ref":"#/components/schemas/uuid.Uuid"},"job_identity":{"$ref":"#/components/schemas/job.JobIdentity"}}},"job.BasketsUpdateRequest":{"type":"object","title":"job.BasketsUpdateRequest","required":["basket_identity","items","job_identity"],"properties":{"basket_identity":{"$ref":"#/components/schemas/uuid.Uuid"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.BasketItemUpdateKind"}},"job_identity":{"$ref":"#/components/schemas/job.JobIdentity"}}},"job.BusinessAttrs":{"type":"object","title":"job.BusinessAttrs","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"job.ClosingReason":{"type":"object","title":"job.ClosingReason","required":["reason"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reason":{"$ref":"#/components/schemas/std.string.String"}}},"job.DiagramHotSpot":{"type":"object","title":"job.DiagramHotSpot","required":["x1_px","x2_px","y1_px","y2_px"],"properties":{"x1_px":{"$ref":"#/components/schemas/i64"},"x2_px":{"$ref":"#/components/schemas/i64"},"y1_px":{"$ref":"#/components/schemas/i64"},"y2_px":{"$ref":"#/components/schemas/i64"}}},"job.DiagramPolygonVector":{"type":"object","title":"job.DiagramPolygonVector","required":["x","y"],"properties":{"x":{"$ref":"#/components/schemas/i64"},"y":{"$ref":"#/components/schemas/i64"}}},"job.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"unprocessable","required":["unprocessable"],"properties":{"unprocessable":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"job.EstimationConfirmation":{"type":"object","title":"job.EstimationConfirmation","required":["delivery_date"],"properties":{"delivery_date":{"description":"legacy attribute, not sure why we chose milliseconds","$ref":"#/components/schemas/i64"},"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"job.EstimationStatus":{"oneOf":[{"type":"object","title":"pending","required":["type"],"properties":{"type":{"const":"pending"}}},{"type":"object","title":"job.EstimationConfirmation","required":["delivery_date","type"],"properties":{"delivery_date":{"description":"legacy attribute, not sure why we chose milliseconds","$ref":"#/components/schemas/i64"},"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"confirmed"}}}]},"job.ExternalInsert":{"allOf":[{"$ref":"#/components/schemas/job.ExternalInsertJobData"},{"type":"object","title":"job.ExternalInsert","properties":{"parts":{"description":"Parts associated with the job. When updating an existing  job, the parts\nin this list are merged with existing parts.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.PartInsertKind"}}]},"vehicle":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.VehicleInsert"}]}}}]},"job.ExternalInsertJobData":{"type":"object","title":"job.ExternalInsertJobData","required":["repairer_site_id"],"properties":{"claim_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"documents":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"images":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}}]},"job_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"level":{"description":"Whether the write was driven by a waiting user (`foreground`) or by an\nunattended sync (`background`).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.JobLevel"}]},"near_total_loss":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"repairer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source":{"description":"Source of the external integration","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.Source"}]},"work_provider":{"deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_contract":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"work_provider_organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"job.GapcPartIdentity":{"type":"object","title":"job.GapcPartIdentity","required":["gapc_brand_id","mpn"],"properties":{"gapc_brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"job.GetManyRequest":{"type":"object","title":"job.GetManyRequest","required":["job_ids","site_ids"],"properties":{"job_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"site_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"job.GetManyResponse":{"type":"object","title":"job.GetManyResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.Job"}}}},"job.InsertRequest":{"type":"object","title":"job.InsertRequest","required":["repairer_site_id"],"properties":{"claim_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"documents":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}},"job_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"level":{"description":"Whether the write was driven by a waiting user (`foreground`) or by an\nunattended sync (`background`).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.JobLevel"}]},"repairer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source":{"description":"Source of the job","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.Source"}]},"source_app":{"description":"Which app created this job (repair or workshop)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.SourceApp"}]},"work_provider":{"deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_contract":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_id":{"description":"* Business ID of the work provider for this job","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"work_provider_organization_id":{"description":"Organization ID of the work provider.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"job.Job":{"type":"object","title":"job.Job","required":["business_id","created_at","deleted_at","estimation_status","id","organization_id","site_id","source","status","updated_at"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"claim_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"documents":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}},"estimation_status":{"$ref":"#/components/schemas/job.EstimationStatus"},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}},"job_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"level":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.JobLevel"}]},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"near_total_loss":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source":{"$ref":"#/components/schemas/job.Source"},"source_app":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.SourceApp"}]},"status":{"$ref":"#/components/schemas/job.Status"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"vehicle":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.Vehicle"}]},"work_provider":{"deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_contract":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"work_provider_organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"job.JobAttentionKind":{"oneOf":[{"const":"supplier_cancelled_order"},{"const":"supplier_removed_items"}]},"job.JobAttentionPayload":{"oneOf":[{"type":"object","title":"supplier_cancelled_order","required":["affected_job_part_ids","procurement_id","supplier_business_id","supplier_organization_id","type"],"properties":{"affected_job_part_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"supplier_cancelled_order"}}},{"type":"object","title":"supplier_removed_items","required":["affected_job_part_ids","procurement_id","supplier_business_id","supplier_organization_id","type"],"properties":{"affected_job_part_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"supplier_removed_items"}}}]},"job.JobIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"external_id","required":["external_id"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"site_job_number","required":["site_job_number"],"properties":{"site_job_number":{"type":"object","title":"site_job_number","required":["job_number","site_id"],"properties":{"job_number":{"$ref":"#/components/schemas/std.string.String"},"site_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"job.JobLevel":{"oneOf":[{"const":"foreground"},{"const":"background"}]},"job.Part":{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.GapcPartIdentity"}]},{"type":"object","title":"job.Part","required":["description","external_id","id","quantity","status"],"properties":{"assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.PartAssemblyMetadata"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"diagram_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_slot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.PartSlot"}]},"quantity":{"$ref":"#/components/schemas/u8"},"raw_text":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"$ref":"#/components/schemas/job.PartStatus"}}}]},"job.PartAssemblyMetadata":{"type":"object","title":"job.PartAssemblyMetadata","required":["id"],"properties":{"diagram_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_hotspot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.DiagramHotSpot"}]},"diagram_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_pnc":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_segments":{"deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.DiagramPolygonVector"}}}]},"diagram_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hcas":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"id":{"$ref":"#/components/schemas/std.string.String"},"is_interactive":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"job.PartDisjunction":{"oneOf":[{"type":"object","title":"single","required":["kind","part"],"properties":{"kind":{"const":"single"},"part":{"$ref":"#/components/schemas/job.Part"}}},{"type":"object","title":"multiple","required":["kind","parts"],"properties":{"kind":{"const":"multiple"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.Part"}}}}]},"job.PartIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"external_id","required":["external_id"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"}}}]},"job.PartInsertData":{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.GapcPartIdentity"}]},{"type":"object","title":"job.PartInsertData","properties":{"assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.PartAssemblyMetadata"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"description":"legacy 'id' field. use 'identity' for new implementations.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.PartIdentity"}]},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_slot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.PartSlot"}]},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]},"raw_text":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"description":"Note status will never be empty in the job, null will never remove a status. In other words, null/undefined is regarded as the same for this field","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.PartStatus"}]}}}]},"job.PartInsertDisjunction":{"oneOf":[{"type":"object","title":"single","required":["part","type"],"properties":{"part":{"$ref":"#/components/schemas/job.PartInsertData"},"type":{"const":"single"}}},{"type":"object","title":"multiple","required":["parts","type"],"properties":{"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.PartInsertData"}},"type":{"const":"multiple"}}}]},"job.PartInsertKind":{"oneOf":[{"type":"object","title":"single","required":["part","type"],"properties":{"part":{"$ref":"#/components/schemas/job.PartInsertData"},"type":{"const":"single"}}},{"type":"object","title":"disjunction","required":["parts","type"],"properties":{"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.PartInsertDisjunction"}},"type":{"const":"disjunction"}}}]},"job.PartInsertRequestData":{"type":"object","title":"job.PartInsertRequestData","required":["parts"],"properties":{"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.PartInsertKind"}}}},"job.PartInsertResponse":{"type":"object","title":"job.PartInsertResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.PartKind"}}}},"job.PartKind":{"oneOf":[{"type":"object","title":"single","required":["kind","part"],"properties":{"kind":{"const":"single"},"part":{"$ref":"#/components/schemas/job.Part"}}},{"type":"object","title":"disjunction","required":["kind","parts"],"properties":{"kind":{"const":"disjunction"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.PartDisjunction"}}}}]},"job.PartListRequestData":{"type":"object","title":"job.PartListRequestData","properties":{}},"job.PartListResponse":{"type":"object","title":"job.PartListResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.PartKind"}}}},"job.PartSlot":{"type":"object","title":"job.PartSlot","required":["gapc_part_type_id"],"properties":{"gapc_part_type_id":{"$ref":"#/components/schemas/std.string.String"},"gapc_position_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"job.PartStatus":{"oneOf":[{"const":"estimated"},{"const":"ordered"}]},"job.RequestHelpData":{"type":"object","title":"job.RequestHelpData","properties":{"reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"job.RequestedAssessment":{"type":"object","title":"job.RequestedAssessment","required":["basket_id","snapshot_hash"],"properties":{"basket_id":{"$ref":"#/components/schemas/uuid.Uuid"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"snapshot_hash":{"$ref":"#/components/schemas/std.string.String"}}},"job.ResolvedItem":{"type":"object","title":"job.ResolvedItem","required":["id","resolved_at"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"resolved_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"job.SearchRequest":{"type":"object","title":"job.SearchRequest","required":["site_ids"],"properties":{"keyword":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"level":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.JobLevel"}]},"page":{"$ref":"#/components/schemas/PageRequest"},"site_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.SearchStatusKind"}}}},"job.SearchResponse":{"type":"object","title":"job.SearchResponse","required":["page"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.Job"}},"page":{"$ref":"#/components/schemas/ForwardPagination"}}},"job.SearchStatusKind":{"oneOf":[{"const":"draft"},{"const":"active"},{"const":"interpreting"},{"const":"requested_assessment"},{"const":"ordered"},{"const":"unordered_parts"},{"const":"completed"},{"const":"closed"}]},"job.Source":{"oneOf":[{"const":"partly"},{"const":"i_body_shop"},{"const":"audatex"},{"const":"gt_motive"},{"const":"o_r_m"},{"const":"panel_quote"},{"const":"arnold_clark"},{"const":"thatcham"},{"const":"tf_smith"},{"const":"cabas"}]},"job.SourceApp":{"oneOf":[{"const":"repair"},{"const":"workshop"}]},"job.Status":{"oneOf":[{"type":"object","title":"draft","required":["type"],"properties":{"type":{"const":"draft"}}},{"type":"object","title":"active","required":["type"],"properties":{"type":{"const":"active"}}},{"type":"object","title":"interpreting","required":["type"],"properties":{"type":{"const":"interpreting"}}},{"type":"object","title":"job.RequestedAssessment","required":["basket_id","snapshot_hash","type"],"properties":{"basket_id":{"$ref":"#/components/schemas/uuid.Uuid"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"snapshot_hash":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"requested_assessment"}}},{"type":"object","title":"ordered","required":["type"],"properties":{"type":{"const":"ordered"}}},{"type":"object","title":"job.UnorderedParts","required":["count","type"],"properties":{"count":{"$ref":"#/components/schemas/usize"},"total":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/usize"}]},"type":{"const":"unordered_parts"}}},{"type":"object","title":"completed","required":["type"],"properties":{"type":{"const":"completed"}}},{"type":"object","title":"job.ClosingReason","required":["reason","type"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reason":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"closed"}}},{"type":"object","title":"deleted","required":["type"],"properties":{"type":{"const":"deleted"}}}]},"job.UnorderedParts":{"type":"object","title":"job.UnorderedParts","required":["count"],"properties":{"count":{"$ref":"#/components/schemas/usize"},"total":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/usize"}]}}},"job.UpdateRequestData":{"type":"object","title":"job.UpdateRequestData","properties":{"claim_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"documents":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"images":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.AbsoluteUrl"}}]},"job_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"level":{"description":"Whether the write was driven by a waiting user (`foreground`) or by an\nunattended sync (`background`).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.JobLevel"}]},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"near_total_loss":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"site_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"work_provider":{"deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_contract":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"work_provider_organization_id":{"description":"Organization ID of the work provider","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"job.Vehicle":{"type":"object","title":"job.Vehicle","properties":{"chassis_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"plate_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"variant":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.VehicleVariant"}]}}},"job.VehicleInsert":{"type":"object","title":"job.VehicleInsert","properties":{"chassis_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"plate_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"variant":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.VehicleVariant"}]}}},"job.VehicleVariant":{"type":"object","title":"job.VehicleVariant","required":["description"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"token":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"uvdb_properties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"jobs_v2.CountFilter":{"type":"object","title":"jobs_v2.CountFilter","required":["any"],"properties":{"any":{"description":"A value whose length (characters for strings, items for arrays) must be within MIN..=MAX (inclusive). Violating requests are rejected with HTTP 400.","type":"array","prefixItems":[{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/jobs_v2.CountGroup"}}]}}},"jobs_v2.CountGroup":{"type":"object","title":"jobs_v2.CountGroup","required":["all"],"properties":{"all":{"description":"A value whose length (characters for strings, items for arrays) must be within MIN..=MAX (inclusive). Violating requests are rejected with HTTP 400.","type":"array","prefixItems":[{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/jobs_v2.CountPredicate"}}]}}},"jobs_v2.CountKey":{"oneOf":[{"const":"suppliers_requested"},{"const":"suppliers_quoted"},{"const":"suppliers_declined"},{"const":"suppliers_pending"},{"const":"part_total"},{"const":"covered"},{"const":"uncovered"}]},"jobs_v2.CountOp":{"oneOf":[{"const":"eq"},{"const":"gt"},{"const":"gte"},{"const":"lt"},{"const":"lte"}]},"jobs_v2.CountPredicate":{"type":"object","title":"jobs_v2.CountPredicate","required":["count","op","value"],"properties":{"count":{"$ref":"#/components/schemas/jobs_v2.CountKey"},"op":{"$ref":"#/components/schemas/jobs_v2.CountOp"},"value":{"$ref":"#/components/schemas/i64"}}},"jobs_v2.Direction":{"oneOf":[{"const":"asc"},{"const":"desc"}]},"jobs_v2.FactGroup":{"oneOf":[{"const":"supply"},{"const":"parts"}]},"jobs_v2.JobFacts":{"type":"object","title":"jobs_v2.JobFacts","required":["claim_number","created_at","id","job_number","parts","site_id","source","stale","status","supply","supply_updated_at","updated_at","vehicle","work_provider_id"],"properties":{"claim_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parts":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/jobs_v2.PartFacts"}]},"site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source":{"$ref":"#/components/schemas/job.Source"},"stale":{"$ref":"#/components/schemas/bool"},"status":{"$ref":"#/components/schemas/job.Status"},"supply":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/jobs_v2.SupplyFacts"}]},"supply_updated_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"vehicle":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/jobs_v2.VehicleSummary"}]},"work_provider_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"jobs_v2.Page":{"oneOf":[{"type":"object","title":"first","required":["first"],"properties":{"first":{"type":"object","title":"first","required":["limit","sort"],"properties":{"limit":{"$ref":"#/components/schemas/u32"},"sort":{"$ref":"#/components/schemas/jobs_v2.Sort"}}}}},{"type":"object","title":"after","required":["after"],"properties":{"after":{"type":"object","title":"after","required":["cursor","limit"],"properties":{"cursor":{"$ref":"#/components/schemas/std.string.String"},"limit":{"$ref":"#/components/schemas/u32"}}}}}]},"jobs_v2.PartFacts":{"type":"object","title":"jobs_v2.PartFacts","required":["covered","part_total","uncovered"],"properties":{"covered":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"part_total":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"uncovered":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}},"jobs_v2.SearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"},{"type":"object","title":"invalid_request","required":["invalid_request"],"properties":{"invalid_request":{"type":"object","title":"invalid_request","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"unsupported_filter","required":["unsupported_filter"],"properties":{"unsupported_filter":{"type":"object","title":"unsupported_filter","required":["count"],"properties":{"count":{"$ref":"#/components/schemas/jobs_v2.CountKey"}}}}},{"const":"timeout"}]},"jobs_v2.SearchPagination":{"type":"object","title":"jobs_v2.SearchPagination","required":["next_cursor","total_count"],"properties":{"next_cursor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_count":{"$ref":"#/components/schemas/i64"}}},"jobs_v2.SearchRequest":{"type":"object","title":"jobs_v2.SearchRequest","required":["page","site_ids"],"properties":{"count_filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/jobs_v2.CountFilter"}]},"facts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/jobs_v2.FactGroup"}},"job_ids":{"oneOf":[{"description":"Null","type":"null"},{"description":"A value whose length (characters for strings, items for arrays) must be within MIN..=MAX (inclusive). Violating requests are rejected with HTTP 400.","type":"array","prefixItems":[{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]}]},"keyword":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"level":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/job.JobLevel"}]},"page":{"$ref":"#/components/schemas/jobs_v2.Page"},"site_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/job.SearchStatusKind"}},"vin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"jobs_v2.SearchResponse":{"type":"object","title":"jobs_v2.SearchResponse","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/jobs_v2.JobFacts"}},"pagination":{"$ref":"#/components/schemas/jobs_v2.SearchPagination"}}},"jobs_v2.Sort":{"type":"object","title":"jobs_v2.Sort","required":["direction","key"],"properties":{"direction":{"$ref":"#/components/schemas/jobs_v2.Direction"},"key":{"$ref":"#/components/schemas/jobs_v2.SortKey"}}},"jobs_v2.SortKey":{"oneOf":[{"const":"created_at"}]},"jobs_v2.SupplyFacts":{"type":"object","title":"jobs_v2.SupplyFacts","required":["suppliers_declined","suppliers_pending","suppliers_quoted","suppliers_requested"],"properties":{"suppliers_declined":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"suppliers_pending":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"suppliers_quoted":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"suppliers_requested":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}},"jobs_v2.VehicleSummary":{"type":"object","title":"jobs_v2.VehicleSummary","required":["chassis_number","plate_number","plate_state","variant_description"],"properties":{"chassis_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"variant_description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.ArchivedFilter":{"oneOf":[{"const":"exclude_archived","description":"Only non-archived (deleted_at IS NULL)."},{"const":"only_archived","description":"Only archived (deleted_at IS NOT NULL)."}]},"lookup.AssemblyClassificationTypes":{"oneOf":[{"const":"assembly"},{"const":"assortments"},{"const":"fastener"},{"const":"hardware_kit"},{"const":"installation_kit"},{"const":"kit"},{"const":"length"},{"const":"module"},{"const":"other"},{"const":"set"},{"const":"unit"}]},"lookup.AssemblyFilter":{"oneOf":[{"description":"Match sellables whose (donor_chassis, associated_hca_id) equals any listed pair.","type":"object","title":"any_of","required":["any_of"],"properties":{"any_of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.AssemblyIdentity"}}}},{"description":"Match sellables whose donor_chassis equals this value exactly.","type":"object","title":"donor_chassis_exact","required":["donor_chassis_exact"],"properties":{"donor_chassis_exact":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.AssemblyIdentity":{"description":"A (donor_chassis, hca_id) pair matched together.","type":"object","title":"lookup.AssemblyIdentity","required":["donor_chassis","hca_id"],"properties":{"donor_chassis":{"$ref":"#/components/schemas/std.string.String"},"hca_id":{"$ref":"#/components/schemas/std.string.String"}}},"lookup.AssemblyIncludeOptions":{"description":"Selects which related assemblies to include alongside the primary `items`.","type":"object","title":"lookup.AssemblyIncludeOptions","properties":{"children":{"description":"Direct child sub-assemblies (one level), taken from each returned sellable's\n`sub_assemblies`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"parents":{"description":"Ancestor assemblies reached by walking `assembled_into` upward (recursively, capped at\ndepth 10).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.DateTimeRange":{"description":"A half-open time range `[from, to)`: `from` is inclusive, `to` is exclusive.\nEither bound may be omitted to leave that side unbounded.","type":"object","title":"lookup.DateTimeRange","required":["from","to"],"properties":{"from":{"description":"Inclusive lower bound (`>= from`).","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"to":{"description":"Exclusive upper bound (`< to`).","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"lookup.DepartmentTypes":{"oneOf":[{"const":"accessories"},{"const":"fluids"},{"const":"other"},{"const":"replacement_parts"},{"const":"tool"},{"const":"wheels"}]},"lookup.DonorVehicleItem":{"type":"object","title":"lookup.DonorVehicleItem","required":["sellables","store"],"properties":{"sellables":{"description":"Sellables available for the donor vehicle.","type":"array","items":{"$ref":"#/components/schemas/lookup.SellablesSearchSellableContainer"}},"store":{"description":"Information about the store providing the sellables.","$ref":"#/components/schemas/lookup.StoreContainer"}}},"lookup.DonorVehicleRequest":{"type":"object","title":"lookup.DonorVehicleRequest","required":["donor_chassis","hca_ids","supplier_ids"],"properties":{"donor_chassis":{"description":"Chassis number of the donor vehicle.","$ref":"#/components/schemas/std.string.String"},"hca_ids":{"description":"Human Centric Assembly (HCA) IDs relevant to the donor vehicle.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"supplier_ids":{"description":"A list of supplier IDs associated with the request.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"lookup.DonorVehicleResponse":{"type":"object","title":"lookup.DonorVehicleResponse","required":["items"],"properties":{"items":{"description":"Search results containing sellables grouped by donor vehicle.","type":"array","items":{"$ref":"#/components/schemas/lookup.DonorVehicleItem"}}}},"lookup.ExpiresAtFilter":{"oneOf":[{"type":"object","title":"range","required":["range"],"properties":{"range":{"$ref":"#/components/schemas/lookup.DateTimeRange"}}}]},"lookup.FilterBy":{"description":"Filters combine with AND semantics. All optional.","type":"object","title":"lookup.FilterBy","properties":{"archived":{"description":"Controls deleted_at filtering. Default (None) = include all rows.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.ArchivedFilter"}]},"assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.AssemblyFilter"}]},"expires_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.ExpiresAtFilter"}]},"id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IdFilter"}]},"inventory":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.InventoryFilter"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.NameFilter"}]},"part":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.PartFilter"}]},"sku":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SkuFilter"}]},"tag":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.TagFilter"}]},"updated_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.UpdatedAtFilter"}]}}},"lookup.FitmentClassificationTypes":{"oneOf":[{"const":"attribute_based"},{"const":"not_required"},{"const":"universal"},{"const":"vehicle_based"}]},"lookup.GapcAttribute":{"type":"object","title":"lookup.GapcAttribute","required":["aliases","created_at","descriptions","id","names","type","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"descriptions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"id":{"$ref":"#/components/schemas/std.string.String"},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"type":{"$ref":"#/components/schemas/lookup.GapcAttributeType"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.GapcAttributeContainer":{"type":"object","title":"lookup.GapcAttributeContainer","required":["entity","identity"],"properties":{"entity":{"description":"The gapc attribute entity, if it has been found.\nNon found gapc attributes will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcAttribute"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcAttributeIdentity"}}},"lookup.GapcAttributeIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.GapcAttributeLookupRequestParameters":{"type":"object","title":"lookup.GapcAttributeLookupRequestParameters","required":["identities"],"properties":{"identities":{"description":"The gapc attributes to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttributeIdentity"}}}},"lookup.GapcAttributeOption":{"type":"object","title":"lookup.GapcAttributeOption","required":["aliases","created_at","id","names","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.GapcAttributeOptionIdentity":{"oneOf":[{"description":"**Id** in `UUID` format","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"Exact match for attribute option name, will probably be normalized eventually","type":"object","title":"name","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.GapcAttributeType":{"oneOf":[{"const":"boolean","description":"Boolean value, allowing input as \"Yes\" / \"No\".\nThe value is stored as it is provided.\nThe conversion to the required format is done on the client side."},{"const":"date_time","description":"Date and time with timezone value. The value is stored in the ISO 8601 format.\nThe conversion to the required date format is done on the client side.\nThe time zone is stored as it is provided, default is UTC."},{"const":"string","description":"Free text value."},{"description":"Numeric value with a unit of measure.\nThe vector of units of measure is used to define the possible units of measure.\nThe first unit of measure is the default one (used if a unit is not specified on input).\nIf the vector is empty, the single unit of measure Quantity is used.\nThe value is stored in the original unit of measure.\nThe conversion to the required measurement system is done on the client side.","type":"object","title":"numeric","required":["numeric"],"properties":{"numeric":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"}}}},{"description":"Numeric range with a unit of measure.\nThe vector of units of measure is used to define the possible units of measure.\nThe first unit of measure is the default one (used if a unit is not specified on input).\nIf the vector is empty, the single unit of measure Quantity is used.\nThe value is stored in the original unit of measure.\nThe conversion to the required measurement system is done on the client side.","type":"object","title":"numeric_range","required":["numeric_range"],"properties":{"numeric_range":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"}}}},{"description":"Option value with a list of possible values.\nThe list of possible values is defined by the catalog team and controlled by Partly.\nThe empty list of options means the attribute definition is invalid.\nCustomers can discuss and propose new possible values.\nThe value is stored as an id of the option.","type":"object","title":"option","required":["option"],"properties":{"option":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttributeOption"}}}}]},"lookup.GapcAttributeValue":{"type":"object","title":"lookup.GapcAttributeValue","required":["created_at","edition_created_at","gapc_attribute_id","is_inherited","qualifier","value"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"edition_created_at":{"$ref":"#/components/schemas/i32"},"edition_deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"gapc_attribute_id":{"$ref":"#/components/schemas/std.string.String"},"is_inherited":{"$ref":"#/components/schemas/bool"},"qualifier":{"$ref":"#/components/schemas/lookup.GapcPartAttributeQualifier"},"value":{"$ref":"#/components/schemas/lookup.GapcAttributeValueType"}}},"lookup.GapcAttributeValueType":{"oneOf":[{"type":"object","title":"numeric","required":["numeric"],"properties":{"numeric":{"type":"object","title":"numeric","required":["uom","value"],"properties":{"uom":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"},"value":{"$ref":"#/components/schemas/f64"}}}}},{"type":"object","title":"numeric_range","required":["numeric_range"],"properties":{"numeric_range":{"type":"object","title":"numeric_range","required":["max","min","uom"],"properties":{"max":{"$ref":"#/components/schemas/f64"},"min":{"$ref":"#/components/schemas/f64"},"uom":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"}}}}},{"type":"object","title":"option","required":["option"],"properties":{"option":{"$ref":"#/components/schemas/lookup.GapcAttributeOption"}}},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},{"$ref":"#/components/schemas/bool"},{"$ref":"#/components/schemas/std.string.String"}]},"lookup.GapcBrand":{"type":"object","title":"lookup.GapcBrand","required":["aliases","created_at","descriptions","id","is_oem","names","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"descriptions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"id":{"$ref":"#/components/schemas/std.string.String"},"is_manufacturer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oem":{"$ref":"#/components/schemas/bool"},"is_oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_whitelabel":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"logo_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.GapcBrandContainer":{"type":"object","title":"lookup.GapcBrandContainer","required":["entity","identity"],"properties":{"entity":{"description":"The gapc brand entity, if it has been found.\nNon found gapc brands will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcBrand"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcBrandIdentity"}}},"lookup.GapcBrandIdentity":{"oneOf":[{"description":"Partly brand suid (e.g. `GBRN100`)","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.GapcBrandLookupRequestParameters":{"type":"object","title":"lookup.GapcBrandLookupRequestParameters","required":["identities"],"properties":{"identities":{"description":"The gapc brands to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcBrandIdentity"}}}},"lookup.GapcCategoriesLookupRequestParameters":{"type":"object","title":"lookup.GapcCategoriesLookupRequestParameters","properties":{"identities":{"description":"The gapc categories to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcCategoryIdentity"}}}},"lookup.GapcCategory":{"type":"object","title":"lookup.GapcCategory","required":["aliases","created_at","id","names","updated_at","vehicle_type_id"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/std.string.String"},"image_large":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"image_thumb":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"vehicle_type_id":{"$ref":"#/components/schemas/std.string.String"}}},"lookup.GapcCategoryContainer":{"type":"object","title":"lookup.GapcCategoryContainer","required":["entity","identity"],"properties":{"entity":{"description":"The gapc category entity, if it has been found.\nNon found gapc category will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcCategory"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcCategoryIdentity"}}},"lookup.GapcCategoryIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.GapcFitment":{"type":"object","title":"lookup.GapcFitment","required":["created_at","edition_created_at","fitment_notes","is_inherited","qualifier","restrictions","uvdb_vehicle_definition_id"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"edition_created_at":{"$ref":"#/components/schemas/i32"},"edition_deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"fitment_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"is_inherited":{"$ref":"#/components/schemas/bool"},"qualifier":{"$ref":"#/components/schemas/lookup.GapcPartFitmentQualifier"},"restrictions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"uvdb_vehicle_definition_id":{"$ref":"#/components/schemas/std.string.String"}}},"lookup.GapcInheritance":{"type":"object","title":"lookup.GapcInheritance","required":["created_at","edition_created_at","parents"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"edition_created_at":{"$ref":"#/components/schemas/i32"},"edition_deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"parents":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcInheritanceParent"}}}},"lookup.GapcInheritanceParent":{"type":"object","title":"lookup.GapcInheritanceParent","required":["edition","inheritance_mode","part_id","store_id"],"properties":{"edition":{"description":"Edition of a parent part","$ref":"#/components/schemas/i32"},"inheritance_mode":{"description":"The mode the inheritance is set to","$ref":"#/components/schemas/lookup.PartInheritanceMode"},"part_id":{"description":"Part id of a parent part","$ref":"#/components/schemas/uuid.Uuid"},"store_id":{"description":"Store id of a parent part","$ref":"#/components/schemas/uuid.Uuid"}}},"lookup.GapcInterchange":{"type":"object","title":"lookup.GapcInterchange","required":["created_at","edition_created_at","interchange_brand_id","interchange_mpn","interchange_original_mpn","is_inherited","qualifier"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"edition_created_at":{"$ref":"#/components/schemas/i32"},"edition_deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"interchange_brand_id":{"$ref":"#/components/schemas/std.string.String"},"interchange_mpn":{"$ref":"#/components/schemas/std.string.String"},"interchange_original_mpn":{"$ref":"#/components/schemas/std.string.String"},"is_inherited":{"$ref":"#/components/schemas/bool"},"qualifier":{"$ref":"#/components/schemas/lookup.GapcPartInterchangeQualifier"}}},"lookup.GapcPart":{"allOf":[{"$ref":"#/components/schemas/lookup.GapcSpecificationData"},{"type":"object","title":"lookup.GapcPart","required":["brand_id","id","latest_edition","mpn"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"edition_deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"latest_edition":{"$ref":"#/components/schemas/i32"},"mpn":{"$ref":"#/components/schemas/std.string.String"},"original_mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}}]},"lookup.GapcPartAttributeQualifier":{"oneOf":[{"const":"critical"},{"const":"fitment"},{"const":"important"},{"const":"info"},{"const":"internal"},{"const":"suppressed","description":"Attribute is not applicable to the part"}]},"lookup.GapcPartAttributeValue":{"oneOf":[{"type":"object","title":"boolean","required":["boolean"],"properties":{"boolean":{"$ref":"#/components/schemas/bool"}}},{"type":"object","title":"date_time","required":["date_time"],"properties":{"date_time":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},{"type":"object","title":"string","required":["string"],"properties":{"string":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"numeric","required":["numeric"],"properties":{"numeric":{"type":"object","title":"numeric","required":["uom","value"],"properties":{"uom":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"},"value":{"$ref":"#/components/schemas/f64"}}}}},{"type":"object","title":"numeric_range","required":["numeric_range"],"properties":{"numeric_range":{"type":"object","title":"numeric_range","required":["max","min","uom"],"properties":{"max":{"$ref":"#/components/schemas/f64"},"min":{"$ref":"#/components/schemas/f64"},"uom":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"}}}}},{"type":"object","title":"option","required":["option"],"properties":{"option":{"$ref":"#/components/schemas/lookup.GapcAttributeOptionIdentity"}}}]},"lookup.GapcPartCodeLookupRequestInclude":{"type":"object","title":"lookup.GapcPartCodeLookupRequestInclude","required":["categories","positions","subcategories"],"properties":{"categories":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"positions":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"subcategories":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.GapcPartContainer":{"type":"object","title":"lookup.GapcPartContainer","required":["entity","identity"],"properties":{"attributes":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttributeValue"}}]},"entity":{"description":"The gapc part entity, if it has been found.\nNon found gapc parts will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPart"}]},"fitments":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcFitment"}}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcPartIdentity"},"inheritances":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcInheritance"}}]},"interchanges":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcInterchange"}}]},"specifications":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcSpecification"}}]},"uploads":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.Upload"}}]}}},"lookup.GapcPartFitmentQualifier":{"oneOf":[{"const":"upgrade","description":"A meaningful upgrade from the genuine OEM part"},{"const":"exact_replacement","description":"Identical to the genuine OEM part in both form and function"},{"const":"usable","description":"Not quite identical to the genuine OEM part, but can be used in most cases"},{"const":"possible","description":"Different to the genuine OEM part, but possible with a modification"},{"const":"suppressed","description":"Part does not fit the vehicles"}]},"lookup.GapcPartFitmentsIncludeOptions":{"description":"Lookup for fitments narrows the result down to the regions configured for a store.\nA client can apply additional filtering by providing options in this structure.","type":"object","title":"lookup.GapcPartFitmentsIncludeOptions","properties":{"data_standards":{"description":"Return fitments for the specified data standard","type":"array","items":{"$ref":"#/components/schemas/lookup.VehicleDefinitionDataStandard"}},"make_ids":{"description":"Return fitments for the specified makes","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"region_ids":{"description":"Return fitments for the specified regions\nIf not provided, the regions configured for a store will be used\nIf provided, the requested and allowed regions will be used","type":"array","items":{"$ref":"#/components/schemas/std.string.String"},"uniqueItems":true},"vehicle_type_ids":{"description":"Return fitments for the specified vehicle types","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"lookup.GapcPartIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"$ref":"#/components/schemas/lookup.SemanticalGapcPartIdentity"}]},"lookup.GapcPartIdentityContext":{"description":"BrandId, PartNumber","type":"object","title":"lookup.GapcPartIdentityContext","required":["gapc_brand_id","mpn"],"properties":{"gapc_brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"lookup.GapcPartInterchangeQualifier":{"oneOf":[{"const":"upgrade","description":"A meaningful upgrade from the linked part"},{"const":"exact_replacement","description":"Identical to the linked part in both form and function"},{"const":"usable","description":"Not quite identical to the linked part, but can be used in most cases"},{"const":"possible","description":"Different to the linked part, but usable with a modification"},{"const":"related","description":"Different part, but related in a way not described by any other specific relationship"},{"const":"dependant","description":"Different part, but depends on the related part to fit"},{"const":"contains","description":"Part contains the linked part, e.g. this part is an assembly"},{"const":"contained_by","description":"Part is contained by the linked part, e.g. the linked part is an assembly"},{"const":"supersedes","description":"Part supersedes the linked part"},{"const":"alternate_finish","description":"Part has an alternate finish to the linked part"},{"const":"suppressed","description":"Part is not an interchange to the linked part"}]},"lookup.GapcPartPackaging":{"type":"object","title":"lookup.GapcPartPackaging","properties":{"height_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"length_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"packing_unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"quantity_per_packing_unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"weight_g":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"width_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"lookup.GapcPartPositionIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.GapcPartType":{"type":"object","title":"lookup.GapcPartType","required":["aliases","categorizations","created_at","descriptions","id","names","positions","recommended_attributes","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"assembly_classification":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.AssemblyClassificationTypes"}]},"categorizations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartTypeCategorization"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"department":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.DepartmentTypes"}]},"descriptions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"id":{"$ref":"#/components/schemas/std.string.String"},"is_multi_purpose":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"position_classification":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.PositionClassificationTypes"}]},"positions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"primary_fitment_classification":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.FitmentClassificationTypes"}]},"recommended_attributes":{"description":"Attributes which are recommended to be defined on a part of this type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"secondary_fitment_classification":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.FitmentClassificationTypes"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"uvdb_property_id_prefixes":{"description":"Enumerated uvdb properties which are relevant for this part type","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]}}},"lookup.GapcPartTypeCategorization":{"type":"object","title":"lookup.GapcPartTypeCategorization","required":["category_id","subcategory_id"],"properties":{"category_id":{"$ref":"#/components/schemas/std.string.String"},"subcategory_id":{"$ref":"#/components/schemas/std.string.String"}}},"lookup.GapcPartTypeContainer":{"type":"object","title":"lookup.GapcPartTypeContainer","required":["entity","identity"],"properties":{"entity":{"description":"The gapc part type entity, if it has been found.\nNon found gapc part types will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartType"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcPartTypeIdentity"}}},"lookup.GapcPartTypeIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.GapcPartTypeLookupRequestInclude":{"type":"object","title":"lookup.GapcPartTypeLookupRequestInclude","required":["part_codes"],"properties":{"part_codes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartCodeLookupRequestInclude"}]}}},"lookup.GapcPartTypeLookupRequestParameters":{"type":"object","title":"lookup.GapcPartTypeLookupRequestParameters","required":["identities"],"properties":{"identities":{"description":"The gapc part types to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartTypeIdentity"}},"include":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartTypeLookupRequestInclude"}]}}},"lookup.GapcPosition":{"type":"object","title":"lookup.GapcPosition","required":["aliases","created_at","id","names","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/std.string.String"},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.GapcPositionContainer":{"type":"object","title":"lookup.GapcPositionContainer","required":["entity","identity"],"properties":{"entity":{"description":"The gapc position entity, if it has been found.\nNon found gapc positions will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPosition"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcPartPositionIdentity"}}},"lookup.GapcPositionLookupRequestParameters":{"type":"object","title":"lookup.GapcPositionLookupRequestParameters","required":["identities"],"properties":{"identities":{"description":"The gapc positions to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartPositionIdentity"}}}},"lookup.GapcPropertiesIncludeOptions":{"description":"Selects which GAPC reference entities to resolve for the returned parts.","type":"object","title":"lookup.GapcPropertiesIncludeOptions","properties":{"attributes":{"description":"Attribute definitions named by the parts' attribute values, and by their part types'\n`recommended_attributes`, which a part may have no value for yet. The values themselves are\nreturned only when `parts.attributes` asks for them.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"part_types":{"description":"Part types named by the parts' `part_type_id`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"positions":{"description":"Positions named by the parts' `position_id`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.GapcPropertiesLookupRequest":{"type":"object","title":"lookup.GapcPropertiesLookupRequest","properties":{"gapc_attributes":{"description":"Defines if the response should include attributes definitions","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcAttributeLookupRequestParameters"}]},"gapc_brands":{"description":"Defines if the response should include brands data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcBrandLookupRequestParameters"}]},"gapc_categories":{"description":"Defines if the response should include categories data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcCategoriesLookupRequestParameters"}]},"gapc_part_types":{"description":"Defines if the response should include part types data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartTypeLookupRequestParameters"}]},"gapc_positions":{"description":"Defines if the response should include positions data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPositionLookupRequestParameters"}]},"gapc_subcategories":{"description":"Defines if the response should include subcategories data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcSubcategoriesLookupRequestParameters"}]},"languages":{"description":"The languages to use for fields where translation is supported\nIf not provided, all of the available translations will be returned","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"lookup.GapcPropertiesLookupResponse":{"type":"object","title":"lookup.GapcPropertiesLookupResponse","properties":{"gapc_attributes":{"description":"Attributes definitions if these were requested and referenced by the part attribute values","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttributeContainer"}},"gapc_brands":{"description":"Brands data if these were requested and referenced by the parts","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcBrandContainer"}},"gapc_categories":{"description":"Categories data if these were requested and referenced by the part types","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcCategoryContainer"}},"gapc_part_types":{"description":"Part types data if these were requested and referenced by the parts","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartTypeContainer"}},"gapc_positions":{"description":"Positions data if these were requested and referenced by the part types","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPositionContainer"}},"gapc_subcategories":{"description":"Subcategories data if these were requested and referenced by the part types","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcSubcategoryContainer"}}}},"lookup.GapcSpecification":{"allOf":[{"$ref":"#/components/schemas/lookup.GapcSpecificationData"},{"type":"object","title":"lookup.GapcSpecification","required":["created_at","edition_created_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"edition_created_at":{"$ref":"#/components/schemas/i32"},"edition_deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]}}}]},"lookup.GapcSpecificationData":{"type":"object","title":"lookup.GapcSpecificationData","required":["is_performance","is_universal"],"properties":{"description":{"description":"Frequently used as free form text, similar to fitment notes\nbut can include other information like expected endurance, etc.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"fitment_notes":{"description":"Free form text to express fitment nuances which are\nnot captured by the structural fitment data model","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gtin14":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"is_performance":{"$ref":"#/components/schemas/bool"},"is_universal":{"$ref":"#/components/schemas/bool"},"packaging":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartPackaging"}]},"part_type_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"position_id":{"description":"General position, there is fitment specific position","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.GapcSubcategoriesLookupRequestParameters":{"type":"object","title":"lookup.GapcSubcategoriesLookupRequestParameters","properties":{"identities":{"description":"The gapc subcategories to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcSubcategoryIdentity"}}}},"lookup.GapcSubcategory":{"type":"object","title":"lookup.GapcSubcategory","required":["aliases","created_at","id","names","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/std.string.String"},"image_large":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"image_thumb":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.GapcSubcategoryContainer":{"type":"object","title":"lookup.GapcSubcategoryContainer","required":["entity","identity"],"properties":{"entity":{"description":"The gapc subcategory entity, if it has been found.\nNon found gapc subcategories will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcSubcategory"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcSubcategoryIdentity"}}},"lookup.GapcSubcategoryIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.HcaPath":{"oneOf":[{"type":"object","title":"text","required":["text"],"properties":{"text":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.IdFilter":{"oneOf":[{"description":"Match sellables whose `id` equals any listed uuid.","type":"object","title":"any_of","required":["any_of"],"properties":{"any_of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}]},"lookup.IncludeNoOptions":{"type":"object","title":"lookup.IncludeNoOptions","properties":{}},"lookup.IntegrationType":{"oneOf":[{"const":"supplier"},{"const":"repairer"}]},"lookup.InventoryFilter":{"oneOf":[{"type":"object","title":"has_stock_at_any_of","required":["has_stock_at_any_of"],"properties":{"has_stock_at_any_of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}]},"lookup.LookupError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_implemented","required":["not_implemented"],"properties":{"not_implemented":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.NameFilter":{"oneOf":[{"description":"Case-sensitive exact match.","type":"object","title":"exact","required":["exact"],"properties":{"exact":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Case-insensitive prefix match.","type":"object","title":"starts_with","required":["starts_with"],"properties":{"starts_with":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Case-insensitive word match: every word of the input must be the start of some word\nof the name, in any order, so \"headl coroll\" finds \"LH Headlight Toyota Corolla\".\nAny run of non-alphanumeric characters separates words, on both sides. The input needs\nat least one word of 3 or more letters or digits (\"lh headl\" is fine, \"lh\" alone is\nnot); otherwise the search fails with `name_words_too_short`.","type":"object","title":"matches_words","required":["matches_words"],"properties":{"matches_words":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.OAuthIntegrationScope":{"oneOf":[{"const":"supplier","description":"Supplier will give access to supplier baseed integration endpoints"},{"const":"repairer","description":"Repairer will give access to repairer baseed integration endpoints"}]},"lookup.OrderBuyerContact":{"oneOf":[{"type":"object","title":"user","required":["user"],"properties":{"user":{"type":"object","title":"user","required":["user_id"],"properties":{"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"lookup.OrderBy":{"type":"object","title":"lookup.OrderBy","required":["column","direction"],"properties":{"column":{"$ref":"#/components/schemas/lookup.OrderByField"},"direction":{"$ref":"#/components/schemas/lookup.OrderByDirection"}}},"lookup.OrderByDirection":{"oneOf":[{"const":"asc"},{"const":"desc"}]},"lookup.OrderByField":{"oneOf":[{"const":"updated_at"},{"const":"sku"},{"const":"brand_mpn","description":"Sort by (brand_id, mpn). Aligns with idx_sellables_brand_mpn so an\nexact brand+mpn filter and this sort share the same index."}]},"lookup.OrderItemBuyable":{"oneOf":[{"description":"Represents a reference to stock item,\nwhich is tracked by Partly system","type":"object","title":"store","required":["sellable_id","store_address_id","type"],"properties":{"sellable_id":{"description":"The id of the stock item","$ref":"#/components/schemas/uuid.Uuid"},"store_address_id":{"description":"The id of the inventory location","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"type":{"const":"store"}}},{"type":"object","title":"lookup.OrderItemBuyableExternalIdentity","required":["description","type"],"properties":{"description":{"description":"The part name / description / from HCA tree\nProvided by estimator.","$ref":"#/components/schemas/std.string.String"},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderItemBuyablePartIdentity"}]},"type":{"const":"external"}}}]},"lookup.OrderItemBuyableExternalIdentity":{"type":"object","title":"lookup.OrderItemBuyableExternalIdentity","required":["description"],"properties":{"description":{"description":"The part name / description / from HCA tree\nProvided by estimator.","$ref":"#/components/schemas/std.string.String"},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderItemBuyablePartIdentity"}]}}},"lookup.OrderItemBuyablePartIdentity":{"oneOf":[{"$ref":"#/components/schemas/std.string.String"},{"description":"The mpn / brand id (primarily used by OEM suppliers)","type":"object","title":"part","required":["brand","mpn"],"properties":{"brand":{"description":"The name of the brand (e.g. Toyota). Not super relevant\nfor OEMs that only have one brand.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"mpn":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.OrderItemChange":{"allOf":[{"$ref":"#/components/schemas/lookup.OrderItemChangeType"},{"description":"Represents a single item-level change in an order","type":"object","title":"lookup.OrderItemChange","required":["item_identity"],"properties":{"item_description":{"description":"Human-readable description of the item for display purposes","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"item_identity":{"description":"The item identity being changed","$ref":"#/components/schemas/std.string.String"}}}]},"lookup.OrderItemChangeType":{"oneOf":[{"description":"Item was removed from the order","type":"object","title":"item_removed","required":["removed_item","type"],"properties":{"removed_item":{"description":"Snapshot of item at time of removal","$ref":"#/components/schemas/lookup.OrderItemSnapshot"},"type":{"const":"item_removed"}}},{"description":"Item was added to the order","type":"object","title":"item_added","required":["added_item","type"],"properties":{"added_item":{"description":"The newly added item details","$ref":"#/components/schemas/lookup.OrderItemSnapshot"},"type":{"const":"item_added"}}},{"description":"Item was modified (one or more fields changed)","type":"object","title":"item_modified","required":["type"],"properties":{"buyable":{"description":"Buyable/part change (if part was swapped)","oneOf":[{"description":"Null","type":"null"},{"description":"Represents a change to a single field, tracking old and new values","type":"object","title":"lookup.FieldChange<lookup.OrderItemBuyable>","required":["new","old"],"properties":{"new":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderItemBuyable"}]},"old":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderItemBuyable"}]}}}]},"buyable_part_number":{"description":"Part number change (SKU or MPN) for display purposes","oneOf":[{"description":"Null","type":"null"},{"description":"Represents a change to a single field, tracking old and new values","type":"object","title":"lookup.FieldChange<std.string.String>","required":["new","old"],"properties":{"new":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"old":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"purchase_price":{"description":"Purchase price change (if price changed)","oneOf":[{"description":"Null","type":"null"},{"description":"Represents a change to a single field, tracking old and new values","type":"object","title":"lookup.FieldChange<rust_decimal.Decimal>","required":["new","old"],"properties":{"new":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"old":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"quantity":{"description":"Quantity change (if quantity changed)","oneOf":[{"description":"Null","type":"null"},{"description":"Represents a change to a single field, tracking old and new values","type":"object","title":"lookup.FieldChange<u32>","required":["new","old"],"properties":{"new":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"old":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}}]},"shipping_price":{"description":"Shipping price change (if shipping price changed)","oneOf":[{"description":"Null","type":"null"},{"description":"Represents a change to a single field, tracking old and new values","type":"object","title":"lookup.FieldChange<rust_decimal.Decimal>","required":["new","old"],"properties":{"new":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"old":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"type":{"const":"item_modified"}}}]},"lookup.OrderItemCondition":{"oneOf":[{"const":"not_damaged"}]},"lookup.OrderItemReturnDecision":{"oneOf":[{"const":"undecided","description":"The return has not yet been reviewed. We will use this to\ncall attention to order."},{"description":"The return has been accepted","type":"object","title":"accepted","required":["accepted"],"properties":{"accepted":{"description":"The return has been accepted","type":"object","title":"accepted","required":["notes","reviewer_role"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reviewer_role":{"$ref":"#/components/schemas/lookup.OrderItemReturnDecisionRole"}}}}},{"description":"The return has been rejected","type":"object","title":"rejected","required":["rejected"],"properties":{"rejected":{"description":"The return has been rejected","type":"object","title":"rejected","required":["notes","reason","reviewer_role"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reason":{"$ref":"#/components/schemas/lookup.OrderItemReturnRejectedReason"},"reviewer_role":{"$ref":"#/components/schemas/lookup.OrderItemReturnDecisionRole"}}}}}]},"lookup.OrderItemReturnDecisionRole":{"oneOf":[{"const":"supplier"}]},"lookup.OrderItemReturnReason":{"oneOf":[{"const":"not_required","description":"The part ended up not be needed for\nthe repair"},{"const":"incorrectly_supplied","description":"The part was not what was ordered\n(e.g. wrong part number, color, etc)"},{"const":"incorrect_fitment","description":"The part was correctly supplied, but the\npart doesn't fit the vehicle"},{"const":"damaged","description":"The part was damaged in transit"},{"const":"short_supplied","description":"The part was ordered with x quantity but\nreceived less than x."},{"const":"other","description":"Generic other reason"}]},"lookup.OrderItemReturnRejectedReason":{"oneOf":[{"const":"out_of_return_policy","description":"The part was returned outside of the return policy\n(e.g. after specific date, or not meeting certain conditions)"},{"const":"damaged","description":"The part was returned damaged"},{"const":"not_returnable","description":"The part is unable to be returned (e.g. back order part)"},{"const":"other","description":"Generic catch all for other policy violations"}]},"lookup.OrderItemSnapshot":{"description":"Snapshot of an order item at a point in time","type":"object","title":"lookup.OrderItemSnapshot","required":["buyable","identity"],"properties":{"buyable":{"description":"What was being ordered","$ref":"#/components/schemas/lookup.OrderItemBuyable"},"description":{"description":"Description for display purposes","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"identity":{"description":"Item identity","$ref":"#/components/schemas/std.string.String"},"purchase_price":{"description":"Purchase price at time of snapshot","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"description":"Quantity at time of snapshot","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"shipping_price":{"description":"Shipping price at time of snapshot","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.OrderStatusHistoryEventEnriched":{"type":"object","title":"lookup.OrderStatusHistoryEventEnriched","required":["actor","status","timestamp"],"properties":{"actor":{"description":"@deprecated Use actor_enriched instead - kept for backward compatibility with cached frontend clients. Remove after PT-1535.","$ref":"#/components/schemas/lookup.OrderSubjectEntity"},"actor_enriched":{"description":"Enriched actor information with user details","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderSubjectEntityEnrichedData"}]},"status":{"$ref":"#/components/schemas/lookup.SupplierOrderStatus"},"timestamp":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.OrderStatusOnUpdate":{"oneOf":[{"type":"object","title":"confirmed","required":["confirmed"],"properties":{"confirmed":{"type":"object","title":"confirmed","required":["note"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"dispatched","required":["dispatched"],"properties":{"dispatched":{"type":"object","title":"dispatched","required":["note"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}}]},"lookup.OrderSubjectEntity":{"oneOf":[{"type":"object","title":"user","required":["user"],"properties":{"user":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"integration","required":["integration"],"properties":{"integration":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"lookup.OrderSubjectEntityEnrichedData":{"oneOf":[{"type":"object","title":"user","required":["user"],"properties":{"user":{"type":"object","title":"user","required":["email","name","user_id"],"properties":{"email":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"mobile_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"integration","required":["integration"],"properties":{"integration":{"type":"object","title":"integration","required":["integration_id"],"properties":{"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"lookup.PanelUsedConditionGrade":{"oneOf":[{"const":"grade0","description":"Like New"},{"const":"grade_a","description":"Existing damage less than the size of a Credit Card"},{"const":"grade_b","description":"Existing damage less than the size of 2 Credit Cards"},{"const":"grade_c","description":"Existing damage greater than the size of 2 Credit Cards"}]},"lookup.PartAttribute":{"type":"object","title":"lookup.PartAttribute","required":["created_at","gapc_attribute_id","updated_at","value"],"properties":{"created_at":{"description":"Timestamp when the attribute was created.","type":"string","format":"date-time"},"gapc_attribute_id":{"description":"Unique identifier of the GAPC attribute definition associated with this value.","$ref":"#/components/schemas/std.string.String"},"qualifiers":{"description":"Optional qualifiers applied to this attribute","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartAttributeQualifier"}}]},"updated_at":{"description":"Timestamp when the attribute was last updated.","type":"string","format":"date-time"},"value":{"description":"The typed value of the attribute (boolean, numeric, string, range, option, etc.).","$ref":"#/components/schemas/lookup.PartAttributeValue"}}},"lookup.PartAttributeValue":{"oneOf":[{"type":"object","title":"boolean","required":["boolean"],"properties":{"boolean":{"$ref":"#/components/schemas/bool"}}},{"type":"object","title":"date_time","required":["date_time"],"properties":{"date_time":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},{"type":"object","title":"string","required":["string"],"properties":{"string":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"numeric","required":["numeric"],"properties":{"numeric":{"type":"object","title":"numeric","required":["uom","value"],"properties":{"uom":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"},"value":{"$ref":"#/components/schemas/f64"}}}}},{"type":"object","title":"numeric_range","required":["numeric_range"],"properties":{"numeric_range":{"type":"object","title":"numeric_range","required":["max","min","uom"],"properties":{"max":{"$ref":"#/components/schemas/f64"},"min":{"$ref":"#/components/schemas/f64"},"uom":{"$ref":"#/components/schemas/lookup.UnitOfMeasure"}}}}},{"type":"object","title":"option","required":["option"],"properties":{"option":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"lookup.PartFilter":{"oneOf":[{"type":"object","title":"any_of","required":["any_of"],"properties":{"any_of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.PartIdentity"}}}},{"type":"object","title":"mpn_exact","required":["mpn_exact"],"properties":{"mpn_exact":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"mpn_starts_with","required":["mpn_starts_with"],"properties":{"mpn_starts_with":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.PartIdentity":{"description":"A part identity — the `(brand_id, mpn)` pair used throughout sellables search:\nas a request filter (`PartFilter::AnyOf`), on each returned part, and on the\npartner end of an interchange.","type":"object","title":"lookup.PartIdentity","required":["brand_id","mpn"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"lookup.PartIncludeOptions":{"type":"object","title":"lookup.PartIncludeOptions","properties":{"attributes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"forward_interchanges":{"description":"Forward interchanges: the parts this part is superseded by — the direction from an\noriginal part to its newer / superseding replacements.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"reverse_interchanges":{"description":"Reverse interchanges: the parts that this part supersedes — the direction from a\nnewer / superseding part back to the original it replaces.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"specifications":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.PartInheritanceMode":{"oneOf":[{"const":"automatic_approval","description":"Child part inherits from the parent part at its latest edition"},{"const":"manual_approval","description":"Child part inherits from the parent part at an approved edition"}]},"lookup.PartInterchange":{"description":"A part interchange: the partner part reachable from this part, with its interchange qualifiers.","type":"object","title":"lookup.PartInterchange","required":["identity"],"properties":{"group_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"group_quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"identity":{"$ref":"#/components/schemas/lookup.PartIdentity"},"qualifiers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartInterchangeQualifier"}}}},"lookup.PartSelectionContext":{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartIdentityContext"}]},{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.PartSlot"}]},{"type":"object","title":"lookup.PartSelectionContext","properties":{"description":{"description":"A description of the part based on the diagram or HCA tree. It is localised\nbased on the origin language of the user.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"ghca_id":{"description":"The id of the part in the HCA tree, related to description\nbut can be used to get more information e.g. i18n","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hca_path":{"description":"Path to the part in the HCA tree.\n[deprecated] - prefer description + ghca_id","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.HcaPath"}]},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"lookup.PartSlot":{"type":"object","title":"lookup.PartSlot","required":["gapc_part_type_id"],"properties":{"gapc_part_type_id":{"$ref":"#/components/schemas/std.string.String"},"gapc_position_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.PartSpecification":{"description":"The `sellables.parts` specification columns for a part.","type":"object","title":"lookup.PartSpecification","required":["created_at","latest_edition","part_id","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"fitment_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gtin14":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"height_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"is_performance":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_universal":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"latest_edition":{"$ref":"#/components/schemas/i32"},"length_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"original_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"packing_unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"part_type_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"position_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity_per_packing_unit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"weight_g":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"width_mm":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]}}},"lookup.PersistedSupplyTypeInfo":{"description":"Persisted supply type information","type":"object","title":"lookup.PersistedSupplyTypeInfo","required":["is_genuine","is_oes_aftermarket"],"properties":{"is_genuine":{"description":"True if the supply type is genuine (OEM)","$ref":"#/components/schemas/bool"},"is_oes_aftermarket":{"description":"True if the supply type is OES aftermarket","$ref":"#/components/schemas/bool"}}},"lookup.PositionClassificationTypes":{"oneOf":[{"const":"general_required"},{"const":"not_required"},{"const":"vehicle_based"}]},"lookup.ProductCondition":{"oneOf":[{"const":"new"},{"type":"object","title":"used","required":["used"],"properties":{"used":{"$ref":"#/components/schemas/lookup.UsedConditionGrade"}}}]},"lookup.ReturnPolicy":{"oneOf":[{"const":"no_returns","description":"Order item cannot be returned"},{"description":"Order item can be returned if it satisfies condition and return date","type":"object","title":"allow_returns","required":["allow_returns"],"properties":{"allow_returns":{"description":"Order item can be returned if it satisfies condition and return date","type":"object","title":"allow_returns","required":["before_date","condition"],"properties":{"before_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderItemCondition"}]}}}}}]},"lookup.Sellable":{"type":"object","title":"lookup.Sellable","required":["created_at","id","is_listable","latest_edition","sku","store_id","updated_at"],"properties":{"assembled_into":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"associated_hca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"barcode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellableCondition"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"dealer_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"donor_chassis":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expires_at":{"description":"TTL expiry for this sellable, after which a sweeper will delete the record.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"gapc_part_id":{"description":"The part id that this sellable is linked with.\nNote that this is a part id in the scope of the same store where the sellable is.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_listable":{"$ref":"#/components/schemas/bool"},"latest_edition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"original_donor_chassis":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sellable_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellableKind"}]},"sku":{"$ref":"#/components/schemas/std.string.String"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"wholesale_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.SellableCondition":{"oneOf":[{"const":"new"},{"type":"object","title":"used","required":["used"],"properties":{"used":{"$ref":"#/components/schemas/lookup.UsedConditionGrade"}}}]},"lookup.SellableContainer":{"type":"object","title":"lookup.SellableContainer","required":["entity","identity"],"properties":{"entity":{"description":"The sellable entity, if it has been found.\nNon found sellables will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.Sellable"}]},"groupings":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableGrouping"}}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.SellableIdentity"},"integrations":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableIntegration"}}]},"inventories":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableInventory"}}]},"sub_assemblies":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SubAssemblyIdentity"}}]},"tags":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableTag"}}]},"uploads":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.Upload"}}]}}},"lookup.SellableGrouping":{"type":"object","title":"lookup.SellableGrouping","required":["child_id","created_at","max_quantity","min_quantity","relative_order","updated_at"],"properties":{"child_id":{"$ref":"#/components/schemas/lookup.SellableGroupingIdentity"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"max_quantity":{"description":"Specifies max quantity for kit sellables","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"min_quantity":{"description":"Only meaningful for kit sellables, indicates whether this sellable is required\n(`min_quantity` > 0 means it's required)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"relative_order":{"description":"Specifies sorting field for multiple grouped children","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.SellableGroupingIdentity":{"oneOf":[{"type":"object","title":"variable_product_item","required":["product","variant"],"properties":{"product":{"$ref":"#/components/schemas/uuid.Uuid"},"variant":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"product_item","required":["product"],"properties":{"product":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"variant_item","required":["variant"],"properties":{"variant":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"lookup.SellableIdentity":{"oneOf":[{"description":"**Id** in `UUID` format","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"**SKU** in `String` format","type":"object","title":"sku","required":["sku"],"properties":{"sku":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"A way for integrations to refer to a sellable using **external id**\nThis variant can be used only if a request is coming from an integration.","type":"object","title":"external","required":["external"],"properties":{"external":{"description":"A way for integrations to refer to a sellable using **external id**\nThis variant can be used only if a request is coming from an integration.","type":"object","title":"external","required":["external_id","integration_id"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"},"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"description":"A way for integrations to refer to a sellable using the start of a sellables **external id**\nThis variant can be used only if a request is coming from an integration","type":"object","title":"external_id_prefix","required":["external_id_prefix"],"properties":{"external_id_prefix":{"description":"A way for integrations to refer to a sellable using the start of a sellables **external id**\nThis variant can be used only if a request is coming from an integration","type":"object","title":"external_id_prefix","required":["integration_id","prefix"],"properties":{"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"},"prefix":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"lookup.SellableIncludeOptions":{"type":"object","title":"lookup.SellableIncludeOptions","properties":{"assemblies":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.AssemblyIncludeOptions"}]},"brands":{"description":"Resolve the brands the returned sellables name, and the brands of their parts' interchange\npartners when interchanges are requested.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"gapc_properties":{"description":"Resolve the GAPC reference ids the returned parts carry — part type, position, and the\nattribute definitions behind each attribute value and each part type's recommended\nattributes — into named entities on the response, so a row can be rendered from this\nresponse alone.\n\nReference data describes the parts it belongs to, so requesting any of it also populates\n`parts`, carrying whichever sub-objects the `parts` include asked for, which may be none.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPropertiesIncludeOptions"}]},"inventories":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"parts":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.PartIncludeOptions"}]},"tags":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"uploads":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.SellableIntegration":{"type":"object","title":"lookup.SellableIntegration","required":["created_at","external_id","external_url","integration_id","is_sync_required","issues","metadata","pulled_at","pushed_at","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"external_id":{"description":"Unique with an integration an identifier of a sellalble in the external system.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"external_url":{"description":"A URL to a sellable in the external system, if it exists.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"integration_id":{"description":"Integration identifier, which owns this sellable metadata record.","$ref":"#/components/schemas/uuid.Uuid"},"is_sync_required":{"description":"Defines if a sellable requires synchronization with an external system,\nintegrated by an integration.","$ref":"#/components/schemas/bool"},"issues":{"description":"A list of issues found during synchronization\nand reported by an integration.","type":"array","items":{"$ref":"#/components/schemas/lookup.output.SellableIntegrationIssue"}},"metadata":{"description":"A bag of data saved and read by an integration.","$ref":"#/components/schemas/serde_json.Value"},"pulled_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"pushed_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.SellableInventory":{"type":"object","title":"lookup.SellableInventory","required":["created_at","product_id","quantity","store_address_id","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"estimated_quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"is_backorderable":{"$ref":"#/components/schemas/bool"},"product_id":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_address_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.SellableInventoryEmbedded":{"type":"object","title":"lookup.SellableInventoryEmbedded","required":["is_backorderable","store_address_id"],"properties":{"estimated_quantity":{"description":"Sellable estimated quantity.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"is_backorderable":{"description":"Sellable backorderable flag.","$ref":"#/components/schemas/bool"},"quantity":{"description":"Sellable quantity.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"store_address_id":{"description":"Store address ID. It is a unique identifier of the inventory item.","$ref":"#/components/schemas/uuid.Uuid"}}},"lookup.SellableItem":{"type":"object","title":"lookup.SellableItem","required":["sellables","store"],"properties":{"gapc_part":{"description":"GAPC part linked to the sellables (same part for all sellables). Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellablesSearchGapcPartContainer"}]},"sellables":{"description":"Sellables provided by the supplier.","type":"array","items":{"$ref":"#/components/schemas/lookup.SellablesSearchSellableContainer"}},"store":{"description":"Information about the store providing the sellables.","$ref":"#/components/schemas/lookup.StoreContainer"}}},"lookup.SellableKind":{"oneOf":[{"const":"kit"},{"const":"product"},{"const":"variant"},{"const":"assembly"}]},"lookup.SellableListItem":{"type":"object","title":"lookup.SellableListItem","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"lookup.SellableSearchV2ResponseSellable":{"type":"object","title":"lookup.SellableSearchV2ResponseSellable","required":["created_at","id","sku","updated_at"],"properties":{"archived_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"assembled_into":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"associated_hca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"barcode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.ProductCondition"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"data_origin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"dealer_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"donor_chassis":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expires_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.PartIdentity"}]},"inventories":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableInventoryEmbedded"}}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"original_donor_chassis":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"original_mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sku":{"$ref":"#/components/schemas/std.string.String"},"sub_assemblies":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"tags":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableTagEmbedded"}}]},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"uploads":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableSearchV2Upload"}}]},"wholesale_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.SellableSearchV2Upload":{"description":"An upload on a sellable: the stored fields, plus the CDN URLs a client renders it from.","type":"object","title":"lookup.SellableSearchV2Upload","required":["kind","large_url","original_url","qualifier","relative_order"],"properties":{"kind":{"description":"Upload kind.","$ref":"#/components/schemas/lookup.UploadKind"},"large_url":{"description":"Full-size URL to render or download the upload from.","$ref":"#/components/schemas/std.string.String"},"original_url":{"description":"Upload original URL. It is a unique identifier of the upload item.","$ref":"#/components/schemas/std.string.String"},"qualifier":{"description":"Upload qualifier.","$ref":"#/components/schemas/lookup.UploadQualifier"},"relative_order":{"description":"Upload relative order.","$ref":"#/components/schemas/u32"},"small_url":{"description":"Thumbnail URL. Set for images only.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"storage_file_path":{"description":"Upload file path in the cloud storage.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"title":{"description":"Upload title.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.SellableTag":{"type":"object","title":"lookup.SellableTag","required":["created_at","is_internal","name","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"is_internal":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.SellableTagEmbedded":{"type":"object","title":"lookup.SellableTagEmbedded","required":["is_internal","name"],"properties":{"is_internal":{"description":"Flag indicates whether tag is internal or not.","$ref":"#/components/schemas/bool"},"name":{"description":"Tag name. It is a unique identifier of the tag item.","$ref":"#/components/schemas/std.string.String"}}},"lookup.SellablesLookupRequest":{"type":"object","title":"lookup.SellablesLookupRequest","required":["sellables"],"properties":{"gapc_attributes":{"description":"Defines if the response should include attributes definitions","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"gapc_brands":{"description":"Defines if the response should include brands data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"gapc_categories":{"description":"Defines if the response should include categories data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"gapc_part_types":{"description":"Defines if the response should include part types data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"gapc_parts":{"description":"Defines if the response should include parts data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellablesLookupRequestIncludeGapcParts"}]},"gapc_positions":{"description":"Defines if the response should include positions data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"gapc_subcategories":{"description":"Defines if the response should include subcategories data","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"languages":{"description":"The languages to use for fields where translation is supported\nIf not provided, all of the available translations will be returned","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"sellables":{"description":"Defines what sellables should be returned","$ref":"#/components/schemas/lookup.SellablesLookupRequestParameters"},"uvdb_properties":{"description":"Defines if the response should include uvdb properties","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"uvdb_vehicle_definitions":{"description":"Defines if the response should include uvdb vehicle definitions","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.SellablesLookupRequestIncludeGapcParts":{"type":"object","title":"lookup.SellablesLookupRequestIncludeGapcParts","properties":{"attributes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"fitments":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartFitmentsIncludeOptions"}]},"inheritances":{"description":"Lookup for parts by default returns buyer's view of a part.\nIt means all relations are merged with inherited parts and inheritances are not returned.\nInherited (parent) parts are not returned as well.\nWhen a client requests to include inheritances, the response will:\n- include inherited (parent) parts with buyer's view\n- include history of inheritances for the requested parts\n- part relations will not be merged with inherited parts,\ninstead the response will include available history of relations\nas these are defined by the seller, including with all available editions\nand potentially with the qualifiers of the relations equal to `suppressed`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"interchanges":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"specifications":{"description":"Lookup for parts by default returns buyer's view of a part.\nIt means the latest version of the specification is 'embedded' in the part entity.\nIf a client requests inheritances, it most likely makes sense to request to\ninclude specifications as well. This way the response will include\navailable history of specifications as these were provided by a seller.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"uploads":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.SellablesLookupRequestParameters":{"type":"object","title":"lookup.SellablesLookupRequestParameters","required":["identities"],"properties":{"groupings":{"description":"Defines if the response should include groupings","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"identities":{"description":"The sellables to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableIdentity"}},"integrations":{"description":"Defines if the response should include integrations metadata","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"inventories":{"description":"Defines if the response should include inventories","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"sub_assemblies":{"description":"Defines if the response should include sub-assemblies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellablesLookupRequestSubAssembliesIncludeOptions"}]},"tags":{"description":"Defines if the response should include tags","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]},"uploads":{"description":"Defines if the response should include uploads","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.IncludeNoOptions"}]}}},"lookup.SellablesLookupRequestSubAssembliesIncludeOptions":{"type":"object","title":"lookup.SellablesLookupRequestSubAssembliesIncludeOptions","properties":{"depth":{"description":"How many levels of sub-assemblies will be returned. Default depth is 1. Maximum depth is 10.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]}}},"lookup.SellablesLookupResponse":{"type":"object","title":"lookup.SellablesLookupResponse","required":["sellables"],"properties":{"gapc_attributes":{"description":"Attributes definitions if these were requested and referenced by the part attribute values","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttributeContainer"}},"gapc_brands":{"description":"Brands data if these were requested and referenced by the parts","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcBrandContainer"}},"gapc_categories":{"description":"Categories data if these were requested and referenced by the part types","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcCategoryContainer"}},"gapc_part_types":{"description":"Part types data if these were requested and referenced by the parts","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartTypeContainer"}},"gapc_parts":{"description":"Parts data if these were requested and referenced by the sellables","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartContainer"}},"gapc_positions":{"description":"Positions data if these were requested and referenced by the part types","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPositionContainer"}},"gapc_subcategories":{"description":"Subcategories data if these were requested and referenced by the part types","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcSubcategoryContainer"}},"sellables":{"description":"The sellables data for the requested sellables","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableContainer"}},"uvdb_properties":{"description":"UVDB properties if these were requested and referenced by the vehicle definitions","type":"array","items":{"$ref":"#/components/schemas/lookup.UvdbPropertyContainer"}},"uvdb_vehicle_definitions":{"description":"UVDB vehicle definitions if these were requested and referenced by the part fitments","type":"array","items":{"$ref":"#/components/schemas/lookup.UvdbVehicleDefinitionContainer"}}}},"lookup.SellablesSearchGapcPart":{"allOf":[{"$ref":"#/components/schemas/lookup.GapcSpecificationData"},{"type":"object","title":"lookup.SellablesSearchGapcPart","required":["brand_id","created_at","id","latest_edition","mpn","updated_at"],"properties":{"brand_id":{"description":"ID of the brand associated with the part.","$ref":"#/components/schemas/std.string.String"},"certification_body":{"description":"Certification body of the part (`GATR10085` attribute), if any. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"created_at":{"description":"Timestamp when the part was created.","type":"string","format":"date-time"},"edition_deleted_at":{"description":"Edition deletion timestamp, if deleted. May be skipped if not deleted.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"id":{"description":"Unique identifier of the GAPC part.","$ref":"#/components/schemas/uuid.Uuid"},"latest_edition":{"description":"Latest edition number of the part.","$ref":"#/components/schemas/i32"},"mpn":{"description":"Manufacturer part number (MPN) of the part.","$ref":"#/components/schemas/std.string.String"},"original_mpn":{"description":"Original manufacturer part number, if different. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"Timestamp when the part was last updated.","type":"string","format":"date-time"}}}]},"lookup.SellablesSearchGapcPartContainer":{"type":"object","title":"lookup.SellablesSearchGapcPartContainer","required":["entity","identity"],"properties":{"entity":{"description":"The GAPC part entity.","$ref":"#/components/schemas/lookup.SellablesSearchGapcPart"},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.GapcPartIdentity"}}},"lookup.SellablesSearchRequest":{"type":"object","title":"lookup.SellablesSearchRequest","required":["brand_id","mpn","supplier_ids"],"properties":{"brand_id":{"description":"The unique identifier of the brand.","$ref":"#/components/schemas/std.string.String"},"mpn":{"description":"The manufacturer's part number.","$ref":"#/components/schemas/std.string.String"},"supplier_ids":{"description":"A list of supplier IDs associated with the request.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"lookup.SellablesSearchResponse":{"type":"object","title":"lookup.SellablesSearchResponse","required":["items"],"properties":{"gapc_brand":{"description":"GAPC brand information. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcBrandContainer"}]},"gapc_part_type":{"description":"GAPC part type. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartTypeContainer"}]},"items":{"description":"List of search results, with each entry corresponding to a supplier.","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableItem"}},"part_position":{"description":"GAPC part position. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPositionContainer"}]}}},"lookup.SellablesSearchSellableContainer":{"type":"object","title":"lookup.SellablesSearchSellableContainer","required":["entity","identity"],"properties":{"entity":{"description":"The sellable entity.","$ref":"#/components/schemas/lookup.Sellable"},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.SellableIdentity"},"inventories":{"description":"Inventories linked to the sellable. Skipped if empty.","type":"array","items":{"$ref":"#/components/schemas/lookup.SellablesSearchSellableInventory"}},"tags":{"description":"Tags associated with the sellable. Skipped if empty.","type":"array","items":{"$ref":"#/components/schemas/lookup.SellablesSearchSellableTag"}},"uploads":{"description":"Uploads related to the sellable. Skipped if empty.","type":"array","items":{"$ref":"#/components/schemas/lookup.SellablesSearchSellableUpload"}}}},"lookup.SellablesSearchSellableInventory":{"type":"object","title":"lookup.SellablesSearchSellableInventory","required":["is_backorderable","store_address_id"],"properties":{"estimated_quantity":{"description":"Sellable estimated quantity.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"is_backorderable":{"description":"Sellable backorderable flag.","$ref":"#/components/schemas/bool"},"quantity":{"description":"Sellable quantity.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"store_address_id":{"description":"Store address ID. It is a unique identifier of the inventory item.","$ref":"#/components/schemas/uuid.Uuid"}}},"lookup.SellablesSearchSellableTag":{"type":"object","title":"lookup.SellablesSearchSellableTag","required":["is_internal","name"],"properties":{"is_internal":{"description":"Flag indicates whether tag is internal or not.","$ref":"#/components/schemas/bool"},"name":{"description":"Tag name. It is a unique identifier of the tag item.","$ref":"#/components/schemas/std.string.String"}}},"lookup.SellablesSearchSellableUpload":{"type":"object","title":"lookup.SellablesSearchSellableUpload","required":["kind","original_url","qualifier","relative_order"],"properties":{"kind":{"description":"The kind of upload.","$ref":"#/components/schemas/lookup.UploadKind"},"original_url":{"description":"Original URL of the upload, serving as a unique identifier.\nDo not use this on the frontend; use `url` instead.","$ref":"#/components/schemas/std.string.String"},"qualifier":{"description":"The upload qualifier.","$ref":"#/components/schemas/lookup.UploadQualifier"},"relative_order":{"description":"The relative order of the upload.","$ref":"#/components/schemas/u32"},"small_url":{"description":"URL for a small thumbnail of the original image.\nOnly available for `UploadKind::Image`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"storage_file_path":{"description":"File path of the upload in cloud storage. May be skipped if not yet processed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"title":{"description":"Title of the upload. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"url":{"description":"Processed URL for general use. May be skipped if not yet processed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.SellablesSearchV2Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"part_identity_limit_exceeded","required":["part_identity_limit_exceeded"],"properties":{"part_identity_limit_exceeded":{"type":"object","title":"part_identity_limit_exceeded","required":["limit","requested"],"properties":{"limit":{"$ref":"#/components/schemas/usize"},"requested":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"invalid_mpn","required":["invalid_mpn"],"properties":{"invalid_mpn":{"type":"object","title":"invalid_mpn","required":["mpn","reason"],"properties":{"mpn":{"$ref":"#/components/schemas/std.string.String"},"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"name_words_too_short","required":["name_words_too_short"],"properties":{"name_words_too_short":{"type":"object","title":"name_words_too_short","required":["min_chars"],"properties":{"min_chars":{"$ref":"#/components/schemas/usize"}}}}}]},"lookup.SellablesSearchV2Request":{"type":"object","title":"lookup.SellablesSearchV2Request","properties":{"filter_by":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.FilterBy"}]},"include":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellableIncludeOptions"}]},"order_by":{"description":"When omitted: return up to `limit` matching rows, no pagination.\nWhen provided: cursor-based pagination sorted by the given column.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderBy"}]},"page":{"$ref":"#/components/schemas/PageRequest"}}},"lookup.SellablesSearchV2Response":{"type":"object","title":"lookup.SellablesSearchV2Response","required":["items","pagination"],"properties":{"brands":{"description":"Brands referenced by the returned sellables and by their parts' interchange partners,\ndeduplicated by id. Empty unless the request asked for the brands include.","type":"array","items":{"$ref":"#/components/schemas/lookup.SellablesSearchV2ResponseBrand"}},"gapc_properties":{"description":"GAPC reference entities named by the returned parts. Present only when the request asked\nfor the `gapc_properties` include; each list holds what that include selected.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellablesSearchV2ResponseGapcProperties"}]},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableSearchV2ResponseSellable"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]},"parts":{"description":"Parts referenced by the returned sellables, deduplicated by (brand_id, mpn).","type":"array","items":{"$ref":"#/components/schemas/lookup.SellablesSearchV2ResponsePart"}}}},"lookup.SellablesSearchV2ResponseBrand":{"description":"One GAPC brand referenced by the returned sellables or their interchange partners. Brands not\navailable are omitted.","type":"object","title":"lookup.SellablesSearchV2ResponseBrand","required":["aliases","created_at","descriptions","id","is_oem","names","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"descriptions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"id":{"$ref":"#/components/schemas/std.string.String"},"is_manufacturer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oem":{"$ref":"#/components/schemas/bool"},"is_oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_whitelabel":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"logo_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.SellablesSearchV2ResponseGapcProperties":{"description":"The reference entities behind the GAPC ids carried on `parts`. Each list is deduplicated and\nordered by id. An id with no reference data available is omitted rather than reported as an\nerror — these describe the parts the request asked for, they are not results in their own right.","type":"object","title":"lookup.SellablesSearchV2ResponseGapcProperties","properties":{"attributes":{"description":"Attribute *definitions* — the types and option sets that the values on `parts[].attributes`\nrefer to by id, plus the part types' `recommended_attributes`.","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttribute"}},"part_types":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPartType"}},"positions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcPosition"}}}},"lookup.SellablesSearchV2ResponsePart":{"description":"One part referenced by the returned sellables, keyed by its (brand_id, mpn) identity.","type":"object","title":"lookup.SellablesSearchV2ResponsePart","required":["created_at","id","identity","latest_edition","updated_at"],"properties":{"attributes":{"description":"Per-part attributes. Present when attributes were requested.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.PartAttribute"}}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"forward_interchanges":{"description":"Forward interchanges: the parts this part is superseded by — the direction from an\noriginal part to its newer / superseding replacements. Present when forward\ninterchanges were requested.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.PartInterchange"}}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"identity":{"$ref":"#/components/schemas/lookup.PartIdentity"},"latest_edition":{"$ref":"#/components/schemas/i32"},"reverse_interchanges":{"description":"Reverse interchanges: the parts that this part supersedes — the direction from a\nnewer / superseding part back to the original it replaces. Present when reverse\ninterchanges were requested.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.PartInterchange"}}]},"specification":{"description":"Parts-table specifications. Present when specifications were requested.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.PartSpecification"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.SemanticalGapcPartIdentity":{"type":"object","title":"lookup.SemanticalGapcPartIdentity","required":["brand","mpn"],"properties":{"brand":{"description":"Brand identifier (can be id like `GBRN100`, name like `Toyota`, or external id like `\"aaia\": \"CWNM\"`)","$ref":"#/components/schemas/lookup.GapcBrandIdentity"},"mpn":{"description":"Normalized or original MPN (core-server will normalize it)","$ref":"#/components/schemas/std.string.String"}}},"lookup.SkuFilter":{"oneOf":[{"type":"object","title":"exact","required":["exact"],"properties":{"exact":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Case-insensitive prefix match.","type":"object","title":"starts_with","required":["starts_with"],"properties":{"starts_with":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.Store":{"type":"object","title":"lookup.Store","required":["business_id","id","name"],"properties":{"business_id":{"description":"Store business id.","$ref":"#/components/schemas/uuid.Uuid"},"country_code":{"description":"Store country code. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"id":{"description":"Store unique identifier.","$ref":"#/components/schemas/uuid.Uuid"},"is_deleted":{"description":"Flag whether store is soft-deleted or not.","$ref":"#/components/schemas/bool"},"name":{"description":"Store name","$ref":"#/components/schemas/std.string.String"},"primary_phone":{"description":"Store primary phone. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"website":{"description":"Store website. Optional.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.StoreAddress":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","title":"lookup.StoreAddress","required":["id"],"properties":{"id":{"description":"Store address id.","$ref":"#/components/schemas/uuid.Uuid"}}}]},"lookup.StoreContainer":{"type":"object","title":"lookup.StoreContainer","required":["entity","identity","store_addresses"],"properties":{"entity":{"description":"Store entity.","$ref":"#/components/schemas/lookup.Store"},"identity":{"description":"Entity identity.","$ref":"#/components/schemas/lookup.StoreIdentity"},"store_addresses":{"description":"Store addresses.","type":"object","additionalProperties":{"$ref":"#/components/schemas/lookup.StoreAddress"}}}},"lookup.StoreIdentity":{"oneOf":[{"description":"**Id** in `UUID` format","type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"lookup.SubAssemblyIdentity":{"description":"This model is used for representing sub-assemblies in lookup","type":"object","title":"lookup.SubAssemblyIdentity","required":["product_id"],"properties":{"brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gapc_part_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"original_mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"product_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"lookup.SupplierMetricKind":{"oneOf":[{"type":"object","title":"order_response_time","required":["type"],"properties":{"type":{"const":"order_response_time"}}},{"type":"object","title":"order_confirmed_rate","required":["type"],"properties":{"type":{"const":"order_confirmed_rate"}}},{"type":"object","title":"order_cancellation_rate","required":["type"],"properties":{"type":{"const":"order_cancellation_rate"}}},{"type":"object","title":"order_difot_rate","required":["type"],"properties":{"type":{"const":"order_difot_rate"}}},{"type":"object","title":"order_as_described_rate","required":["type"],"properties":{"type":{"const":"order_as_described_rate"}}},{"type":"object","title":"offer_response_time","required":["type"],"properties":{"type":{"const":"offer_response_time"}}}]},"lookup.SupplierOrderItemSnapshot":{"type":"object","title":"lookup.SupplierOrderItemSnapshot","properties":{"brand_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sku":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"supply_type_info":{"description":"Supply type information for billing categorization","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.PersistedSupplyTypeInfo"}]}}},"lookup.SupplierOrderItemStatus":{"oneOf":[{"description":"The item has been received by the buyer","type":"object","title":"received","required":["received"],"properties":{"received":{"description":"The item has been received by the buyer","type":"object","title":"received","required":["notes","timestamp"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"timestamp":{"description":"The time that the item was received","type":"string","format":"date-time"}}}}},{"description":"The item has been accepted by the buyer (is the right part\nand in the right condition)","type":"object","title":"accepted","required":["accepted"],"properties":{"accepted":{"description":"The item has been accepted by the buyer (is the right part\nand in the right condition)","type":"object","title":"accepted","required":["notes"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"description":"The item has been returned by the buyer, and the supplier\nhas made a decision on the return","type":"object","title":"returned","required":["returned"],"properties":{"returned":{"description":"The item has been returned by the buyer, and the supplier\nhas made a decision on the return","type":"object","title":"returned","required":["decision","notes","quantity","reason"],"properties":{"decision":{"$ref":"#/components/schemas/lookup.OrderItemReturnDecision"},"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"$ref":"#/components/schemas/u32"},"reason":{"$ref":"#/components/schemas/lookup.OrderItemReturnReason"}}}}}]},"lookup.SupplierOrderSearchOrderedBy":{"oneOf":[{"const":"created_at_desc"},{"const":"deliver_before_asc"}]},"lookup.SupplierOrderStatus":{"oneOf":[{"type":"object","title":"ordered","required":["ordered"],"properties":{"ordered":{"type":"object","title":"ordered","required":["note"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"confirmed","required":["confirmed"],"properties":{"confirmed":{"type":"object","title":"confirmed","required":["note"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"cancelled","required":["cancelled"],"properties":{"cancelled":{"type":"object","title":"cancelled","required":["note"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"dispatched","required":["dispatched"],"properties":{"dispatched":{"type":"object","title":"dispatched","required":["note"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}}]},"lookup.SupplierOrderStatusKind":{"oneOf":[{"const":"ordered"},{"const":"confirmed"},{"const":"cancelled"},{"const":"dispatched"}]},"lookup.TagFilter":{"description":"Filter on the tag names carried by a sellable.\n\nThe two lists combine with AND: a sellable matches when it carries every `all_of` name\nand none of the `none_of` names. Either list may be omitted, and omitting both matches\nevery sellable.\n\nNames match case-insensitively, so `OFFER_REQUEST` also matches a sellable tagged\n`offer_request`.","type":"object","title":"lookup.TagFilter","properties":{"all_of":{"description":"Tag names the sellable must carry every one of.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"none_of":{"description":"Tag names the sellable must carry none of.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"lookup.UnitOfMeasure":{"oneOf":[{"const":"quantity"},{"const":"percent"},{"const":"micrometer"},{"const":"millimeter"},{"const":"centimeter"},{"const":"meter"},{"const":"kilometer"},{"const":"inch"},{"const":"foot"},{"const":"yard"},{"const":"mile"},{"const":"square_meter"},{"const":"square_foot"},{"const":"square_inch"},{"const":"square_yard"},{"const":"square_mile"},{"const":"liter"},{"const":"milliliter"},{"const":"cubic_meter"},{"const":"cubic_foot"},{"const":"cubic_inch"},{"const":"cubic_yard"},{"const":"cubic_mile"},{"const":"milligram"},{"const":"gram"},{"const":"kilogram"},{"const":"ounce"},{"const":"pound"},{"const":"gram_per_cubic_centimeter"},{"const":"kilogram_per_cubic_meter"},{"const":"ounce_per_cubic_inch"},{"const":"pound_per_cubic_foot"},{"const":"millisecond"},{"const":"second"},{"const":"minute"},{"const":"hour"},{"const":"day"},{"const":"month"},{"const":"year"},{"const":"degree"},{"const":"radian"},{"const":"celsius"},{"const":"kelvin"},{"const":"fahrenheit"},{"const":"pascal"},{"const":"kilo_pascal"},{"const":"bar"},{"const":"atmosphere"},{"const":"millibar"},{"const":"pound_per_square_inch"},{"const":"meter_per_second"},{"const":"kilometer_per_hour"},{"const":"mile_per_hour"},{"const":"knot"},{"const":"radian_per_second"},{"const":"degree_per_second"},{"const":"meter_per_second_squared"},{"const":"kilometer_per_hour_squared"},{"const":"mile_per_hour_squared"},{"const":"standard_acceleration_of_gravity"},{"const":"byte"},{"const":"kilobyte"},{"const":"megabyte"},{"const":"gigabyte"},{"const":"terabyte"},{"const":"petabyte"},{"const":"exabyte"},{"const":"zettabyte"},{"const":"yottabyte"},{"const":"joule"},{"const":"kilojoule"},{"const":"megajoule"},{"const":"gigajoule"},{"const":"calorie"},{"const":"kilocalorie"},{"const":"newton"},{"const":"kilonewton"},{"const":"meganewton"},{"const":"giganewton"},{"const":"newton_meter"},{"const":"kilonewton_meter"},{"const":"meganewton_meter"},{"const":"giganewton_meter"},{"const":"kilogram_meter"},{"const":"pound_foot"},{"const":"coulomb"},{"const":"ampere"},{"const":"milliampere"},{"const":"microampere"},{"const":"kiloampere"},{"const":"volt"},{"const":"microvolt"},{"const":"millivolt"},{"const":"kilovolt"},{"const":"ohm"},{"const":"milliohm"},{"const":"kiloohm"},{"const":"megaohm"},{"const":"gigaohm"},{"const":"watt"},{"const":"kilowatt"},{"const":"megawatt"},{"const":"gigawatt"},{"const":"kilowatt_hour"},{"const":"watt_per_square_meter"},{"const":"farad"},{"const":"millifarad"},{"const":"microfarad"},{"const":"kilofarad"},{"const":"henry"},{"const":"millihenry"},{"const":"microhenry"},{"const":"kilohenry"},{"const":"hertz"},{"const":"kilohertz"},{"const":"megahertz"},{"const":"gigahertz"},{"const":"cycle_per_second"},{"const":"degree_per_revolution"},{"const":"revolution_per_minute"},{"const":"ampere_hour"},{"const":"milliampere_hour"},{"const":"microampere_hour"},{"const":"kiloampere_hour"},{"const":"siemens"},{"const":"millisiemens"},{"const":"microsiemens"},{"const":"kilosiemens"},{"const":"weber"},{"const":"milliweber"},{"const":"microweber"},{"const":"kiloweber"},{"const":"tesla"},{"const":"millitesla"},{"const":"microtesla"},{"const":"kilotesla"},{"const":"lux"},{"const":"millilux"},{"const":"kilolux"},{"const":"candela_per_square_meter"},{"const":"candela_per_square_foot"},{"const":"lumen"},{"const":"millilumen"},{"const":"kilolumen"},{"const":"candela"},{"const":"millicandela"},{"const":"microcandela"},{"const":"kilocandela"},{"const":"becquerel"},{"const":"millibecquerel"},{"const":"microbecquerel"},{"const":"kilobecquerel"},{"const":"gray"},{"const":"milligray"},{"const":"microgray"},{"const":"kilogray"},{"const":"sievert"},{"const":"millisievert"},{"const":"microsievert"},{"const":"kilosievert"},{"const":"decibel"},{"const":"american_wire_gauge"},{"const":"gallon_per_hour"},{"const":"gallon_per_minute"},{"const":"liter_per_second"},{"const":"liter_per_hour"},{"const":"liter_per100_kilometers"},{"const":"cubic_centimeter_per_minute"},{"const":"part_per_million"}]},"lookup.UpdatedAtFilter":{"oneOf":[{"type":"object","title":"range","required":["range"],"properties":{"range":{"$ref":"#/components/schemas/lookup.DateTimeRange"}}}]},"lookup.Upload":{"description":"\nUploads are images, videos, documents, etc.\n","type":"object","title":"lookup.Upload","properties":{"kind":{"description":"Defines what kind of upload it is, eg. image, video, etc.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.UploadKind"}]},"large_url":{"description":"Large image url where to download the image from by seller and buyer tools","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"relative_order":{"description":"The relative order of this particular upload","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"small_url":{"description":"Small thumbnail url where to download the image from by seller and buyer tools","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"title":{"description":"File title","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.UploadKind":{"oneOf":[{"const":"image"},{"const":"video"},{"const":"audio"},{"const":"document"},{"const":"diagram","description":"Partly specific format which describes assembly diagram documents\nwith hotspot coordinates"}]},"lookup.UploadQualifier":{"oneOf":[{"const":"main","description":"An upload is a main image / video for a product or a part"},{"const":"regular","description":"An upload is a secondary image / video for a product or a part"},{"const":"suppressed","description":"An upload is suppressed / hidden / not used in the buyer facing UI\nThis is used for parts inheritance overriding,\nas well as by sellables when inheritance of an image from a partis required to be disabled"}]},"lookup.UsedConditionGrade":{"oneOf":[{"type":"object","title":"panel","required":["panel"],"properties":{"panel":{"$ref":"#/components/schemas/lookup.PanelUsedConditionGrade"}}},{"type":"object","title":"distance_traveled","required":["distance_traveled"],"properties":{"distance_traveled":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"operation_hours","required":["operation_hours"],"properties":{"operation_hours":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"remaining_thickness","required":["remaining_thickness"],"properties":{"remaining_thickness":{"$ref":"#/components/schemas/f64"}}}]},"lookup.UvdbPropertiesLookupRequest":{"type":"object","title":"lookup.UvdbPropertiesLookupRequest","properties":{"languages":{"description":"The languages to use for fields where translation is supported\nIf not provided, all of the available translations will be returned","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"uvdb_properties":{"description":"Defines if the response should include uvdb properties","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.UvdbPropertyLookupRequestParameters"}]},"uvdb_vehicle_definitions":{"description":"Defines if the response should include uvdb vehicle definitions","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.UvdbVehicleDefinitionLookupRequestParameters"}]}}},"lookup.UvdbPropertiesLookupResponse":{"type":"object","title":"lookup.UvdbPropertiesLookupResponse","properties":{"uvdb_properties":{"description":"UVDB properties if these were requested and referenced by the vehicle definitions","type":"array","items":{"$ref":"#/components/schemas/lookup.UvdbPropertyContainer"}},"uvdb_vehicle_definitions":{"description":"UVDB vehicle definitions if these were requested and referenced by the part fitments","type":"array","items":{"$ref":"#/components/schemas/lookup.UvdbVehicleDefinitionContainer"}}}},"lookup.UvdbProperty":{"type":"object","title":"lookup.UvdbProperty","required":["aliases","created_at","id","names","updated_at"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/std.string.String"},"names":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"lookup.UvdbPropertyContainer":{"type":"object","title":"lookup.UvdbPropertyContainer","required":["entity","identity"],"properties":{"entity":{"description":"The uvdb property entity, if it has been found.\nNon found uvdb properties will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.UvdbProperty"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.UvdbVehiclePropertyIdentity"}}},"lookup.UvdbPropertyLookupRequestParameters":{"type":"object","title":"lookup.UvdbPropertyLookupRequestParameters","required":["identities"],"properties":{"identities":{"description":"The uvdb properties to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.UvdbVehiclePropertyIdentity"}}}},"lookup.UvdbVehicleDefinition":{"type":"object","title":"lookup.UvdbVehicleDefinition","required":["id","uvdb_origin_region_id","uvdb_property_ids","uvdb_region_ids"],"properties":{"created_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"data_standard":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.VehicleDefinitionDataStandard"}]},"deprecated_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/std.string.String"},"updated_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"uvdb_origin_region_id":{"description":"Region where the vehicle is manufactured","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"uvdb_property_ids":{"description":"Properties describing a vehicle","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"uvdb_region_ids":{"description":"Regions where a vehicle is visible","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"lookup.UvdbVehicleDefinitionContainer":{"type":"object","title":"lookup.UvdbVehicleDefinitionContainer","required":["entity","identity"],"properties":{"entity":{"description":"The uvdb vehicle definition entity, if it has been found.\nNon found uvdb vehicle definitions will be responded with `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.UvdbVehicleDefinition"}]},"identity":{"description":"Entity identity","$ref":"#/components/schemas/lookup.UvdbVehicleDefinitionIdentity"}}},"lookup.UvdbVehicleDefinitionIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.UvdbVehicleDefinitionLookupRequestParameters":{"type":"object","title":"lookup.UvdbVehicleDefinitionLookupRequestParameters","required":["identities"],"properties":{"identities":{"description":"The uvdb vehicle definitions to lookup","type":"array","items":{"$ref":"#/components/schemas/lookup.UvdbVehicleDefinitionIdentity"}}}},"lookup.UvdbVehiclePropertyIdentity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"lookup.VehicleDefinitionDataStandard":{"oneOf":[{"const":"unknown"},{"const":"config_fitment"},{"const":"europe_base_standard"},{"const":"usa_base_standard"},{"const":"partly"},{"const":"usa_base_motorcycles"},{"const":"unknown7"},{"const":"europe_base_motorcycles"},{"const":"europe_base_commercial"},{"const":"australia_base_standard"},{"const":"oem_base_standard"},{"const":"ebay_aus_standard"},{"const":"ebay_de_motorbike_standard"},{"const":"ihs_standard"},{"const":"amazon_standard"},{"const":"mvris_standard"}]},"lookup.VehicleInstanceInfo":{"type":"object","title":"lookup.VehicleInstanceInfo","required":["name"],"properties":{"chassis_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"plate_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"token":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"lookup.input.SellableIntegrationIssue":{"type":"object","title":"lookup.input.SellableIntegrationIssue","required":["code","message","parameters"],"properties":{"code":{"description":"Unique (within an integration schema) issue type code assigned by an integration.","$ref":"#/components/schemas/u32"},"message":{"description":"Debug message from an integration\nIt can contain references to values in parameters,\nthe expectation that the PIM interpolates it.\nTranslation is not supported by the backend,\nwe might do it automatically with 3rd party translate backend in the future.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parameters":{"description":"A bag of data provided by an integration.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]}}},"lookup.output.SellableIntegrationIssue":{"type":"object","title":"lookup.output.SellableIntegrationIssue","required":["code","message","parameters"],"properties":{"code":{"description":"Unique (within an integration schema) issue type code assigned by an integration.","$ref":"#/components/schemas/u32"},"message":{"description":"Debug message from an integration\nIt can contain references to values in parameters,\nthe expectation that the PIM interpolates it.\nTranslation is not supported by the backend,\nwe might do it automatically with 3rd party translate backend in the future.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parameters":{"description":"A bag of data provided by an integration.","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}},"messaging.AttachmentPrepareFile":{"type":"object","title":"messaging.AttachmentPrepareFile","required":["filename","mime_type","size_bytes"],"properties":{"filename":{"$ref":"#/components/schemas/std.string.String"},"mime_type":{"$ref":"#/components/schemas/std.string.String"},"size_bytes":{"$ref":"#/components/schemas/i64"}}},"messaging.AttachmentPrepareUpload":{"type":"object","title":"messaging.AttachmentPrepareUpload","required":["expires_at","storage_key","upload_url"],"properties":{"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"storage_key":{"$ref":"#/components/schemas/std.string.String"},"upload_url":{"$ref":"#/components/schemas/std.string.String"}}},"messaging.AttachmentSeat":{"type":"object","title":"messaging.AttachmentSeat","required":["filename","mime_type","size_bytes","storage_key"],"properties":{"filename":{"$ref":"#/components/schemas/std.string.String"},"mime_type":{"$ref":"#/components/schemas/std.string.String"},"size_bytes":{"$ref":"#/components/schemas/i64"},"storage_key":{"$ref":"#/components/schemas/std.string.String"}}},"messaging.AttachmentUrlError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"conversation_not_found","required":["conversation_not_found"],"properties":{"conversation_not_found":{"type":"object","title":"conversation_not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"const":"attachment_not_found"}]},"messaging.AttachmentUrlRequest":{"description":"Read-side counterpart to `AttachmentsPrepareRequest`. Recipients\nhand in `(conversation_id, message_id, position)` — the same\ntuple that uniquely identifies an attachment row — and receive a\nshort-lived presigned GET URL. The conversation scope is the\nauthorisation boundary: callers must be active participants on\nthe conversation, and the (message, position) pair is verified\nto belong to that conversation before the URL is minted.","type":"object","title":"messaging.AttachmentUrlRequest","required":["conversation_id","message_id","position"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"},"position":{"$ref":"#/components/schemas/i32"}}},"messaging.AttachmentUrlResponse":{"type":"object","title":"messaging.AttachmentUrlResponse","required":["expires_at","filename","mime_type","size_bytes","url"],"properties":{"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"filename":{"$ref":"#/components/schemas/std.string.String"},"mime_type":{"$ref":"#/components/schemas/std.string.String"},"size_bytes":{"$ref":"#/components/schemas/i64"},"url":{"$ref":"#/components/schemas/std.string.String"}}},"messaging.AttachmentsPrepareError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"conversation_not_found","required":["conversation_not_found"],"properties":{"conversation_not_found":{"type":"object","title":"conversation_not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"attachment_too_large","required":["attachment_too_large"],"properties":{"attachment_too_large":{"type":"object","title":"attachment_too_large","required":["max_bytes"],"properties":{"max_bytes":{"$ref":"#/components/schemas/i64"}}}}},{"type":"object","title":"mime_not_allowed","required":["mime_not_allowed"],"properties":{"mime_not_allowed":{"type":"object","title":"mime_not_allowed","required":["allowed"],"properties":{"allowed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"too_many_attachments","required":["too_many_attachments"],"properties":{"too_many_attachments":{"type":"object","title":"too_many_attachments","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"invalid_attachment","required":["invalid_attachment"],"properties":{"invalid_attachment":{"type":"object","title":"invalid_attachment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"messaging.AttachmentsPrepareRequest":{"type":"object","title":"messaging.AttachmentsPrepareRequest","required":["conversation_id","files"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.AttachmentPrepareFile"}}}},"messaging.AttachmentsPrepareResponse":{"type":"object","title":"messaging.AttachmentsPrepareResponse","required":["uploads"],"properties":{"uploads":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.AttachmentPrepareUpload"}}}},"messaging.Conversation":{"type":"object","title":"messaging.Conversation","required":["archived_at","created_at","id","last_message_at","resource"],"properties":{"archived_at":{"description":"`Some(_)` while archived. UI surfaces filter archived\nconversations out of the default inbox; posting is rejected by\nthe service layer.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"last_message_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"resource":{"$ref":"#/components/schemas/messaging.ResourceRef"}}},"messaging.ConversationGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"messaging.ConversationGetRequest":{"type":"object","title":"messaging.ConversationGetRequest","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.ConversationGetResponse":{"type":"object","title":"messaging.ConversationGetResponse","required":["conversation","participants"],"properties":{"conversation":{"$ref":"#/components/schemas/messaging.Conversation"},"participants":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.ConversationParticipant"}}}},"messaging.ConversationInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"duplicate_participant_seat"},{"const":"insufficient_participants"}]},"messaging.ConversationInsertRequest":{"type":"object","title":"messaging.ConversationInsertRequest","required":["participants","resource"],"properties":{"participants":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.ParticipantSeat"}},"resource":{"$ref":"#/components/schemas/messaging.ResourceRef"}}},"messaging.ConversationInsertResponse":{"type":"object","title":"messaging.ConversationInsertResponse","required":["conversation","participants"],"properties":{"conversation":{"$ref":"#/components/schemas/messaging.Conversation"},"participants":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.ConversationParticipant"}}}},"messaging.ConversationParticipant":{"type":"object","title":"messaging.ConversationParticipant","required":["business_id","business_name","conversation_id","joined_at","left_at","organization_id","role"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"business_name":{"description":"Public display name of the participant's business. Resolved at the\nservice boundary (the DAL row carries only ids); `None` when the\nlookup is unavailable or the business has since been removed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"joined_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"left_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"role":{"$ref":"#/components/schemas/messaging.ParticipantRole"}}},"messaging.ConversationReadState":{"type":"object","title":"messaging.ConversationReadState","required":["business_id","conversation_id","last_read_at","last_read_message_id","updated_at","user_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"last_read_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"last_read_message_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.ConversationSearchCursor":{"description":"Opaque keyset cursor mirroring `messaging_dal::ConversationsSearchCursor`.\nCarries the `(last_message_at, id)` pair the DAL sorts on; callers\necho the cursor verbatim into the next request to walk back through\nthe inbox.","type":"object","title":"messaging.ConversationSearchCursor","required":["id","last_message_at"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"last_message_at":{"description":"`None` when the conversation has no messages yet — those rows\nsort after every messaged conversation and tie-break on id.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"messaging.ConversationSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"bad_limit","required":["bad_limit"],"properties":{"bad_limit":{"type":"object","title":"bad_limit","required":["max","requested"],"properties":{"max":{"$ref":"#/components/schemas/u32"},"requested":{"$ref":"#/components/schemas/u32"}}}}}]},"messaging.ConversationSearchRequest":{"type":"object","title":"messaging.ConversationSearchRequest","required":["limit"],"properties":{"cursor":{"description":"Keyset cursor returned from the previous page. `None` starts\nfrom the most recent conversation.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.ConversationSearchCursor"}]},"include_archived":{"description":"Include archived conversations in the result set. Defaults to\n`false` so the inbox view stays clean; an \"Archived\" tab passes\n`true`.","$ref":"#/components/schemas/bool"},"limit":{"description":"Page size; capped at 100. The service rejects out-of-range\nvalues with `BadLimit` so a buggy caller doesn't drag the\nquery off-budget.","$ref":"#/components/schemas/u32"},"participant_user_id":{"description":"Filter to conversations where this user is an active participant\n(has a `conversation_subscriptions` row — created on their first\nmessage / manual subscribe / resource assignment, removed on\nmute). `None` applies no participant filter, so the result set is\nunchanged for callers that don't pass it.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"resource":{"description":"Filter to conversations on this resource. `None` returns every\nconversation the caller participates in (the supplier inbox\nshape).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.ResourceRef"}]}}},"messaging.ConversationSearchResponse":{"type":"object","title":"messaging.ConversationSearchResponse","required":["conversations","next_cursor","participants"],"properties":{"conversations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.Conversation"}},"next_cursor":{"description":"Cursor for the next page, or `None` when the result set is\ndrained. Always `None` when the page came back shorter than\n`limit`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.ConversationSearchCursor"}]},"participants":{"description":"Active participants for every conversation in `conversations`,\nflat and grouped by the client on `conversation_id` (mirrors the\nsnapshot's flat-array shape). `business_name` is hydrated here so\nthe inbox can label each row by its counterparty without a\nper-conversation fetch.","type":"array","items":{"$ref":"#/components/schemas/messaging.ConversationParticipant"}}}},"messaging.ConversationUnread":{"type":"object","title":"messaging.ConversationUnread","required":["conversation_id","unread"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"unread":{"$ref":"#/components/schemas/i64"}}},"messaging.ConversationUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"messaging.ConversationUpdateRequest":{"type":"object","title":"messaging.ConversationUpdateRequest","required":["archived","conversation_id"],"properties":{"archived":{"$ref":"#/components/schemas/bool"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.ConversationUpdateResponse":{"type":"object","title":"messaging.ConversationUpdateResponse","required":["conversation"],"properties":{"conversation":{"$ref":"#/components/schemas/messaging.Conversation"}}},"messaging.Message":{"type":"object","title":"messaging.Message","required":["body","conversation_id","created_at","deleted_at","edited_at","id","kind","parent_message_id","sender_business_id","sender_user_id"],"properties":{"body":{"$ref":"#/components/schemas/serde_json.Value"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"deleted_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"edited_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/messaging.MessageKind"},"parent_message_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"sender_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sender_user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.MessageAttachment":{"type":"object","title":"messaging.MessageAttachment","required":["created_at","filename","message_id","mime_type","position","size_bytes","storage_key"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"filename":{"$ref":"#/components/schemas/std.string.String"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"},"mime_type":{"$ref":"#/components/schemas/std.string.String"},"position":{"$ref":"#/components/schemas/i32"},"size_bytes":{"$ref":"#/components/schemas/i64"},"storage_key":{"$ref":"#/components/schemas/std.string.String"}}},"messaging.MessageInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"conversation_not_found","required":["conversation_not_found"],"properties":{"conversation_not_found":{"type":"object","title":"conversation_not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"const":"parent_message_not_found"},{"type":"object","title":"body_too_long","required":["body_too_long"],"properties":{"body_too_long":{"type":"object","title":"body_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"too_many_attachments","required":["too_many_attachments"],"properties":{"too_many_attachments":{"type":"object","title":"too_many_attachments","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"rate_limited","required":["rate_limited"],"properties":{"rate_limited":{"type":"object","title":"rate_limited","required":["retry_after_ms"],"properties":{"retry_after_ms":{"$ref":"#/components/schemas/u64"}}}}}]},"messaging.MessageInsertRequest":{"type":"object","title":"messaging.MessageInsertRequest","required":["body","conversation_id","parent_message_id"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.AttachmentSeat"}},"body":{"$ref":"#/components/schemas/serde_json.Value"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parent_message_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"messaging.MessageInsertResponse":{"type":"object","title":"messaging.MessageInsertResponse","required":["attachments","message"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.MessageAttachment"}},"message":{"$ref":"#/components/schemas/messaging.Message"}}},"messaging.MessageKind":{"oneOf":[{"const":"text"},{"const":"system"},{"const":"deleted","description":"Tombstone variant. Renderers branch on this directly."}]},"messaging.MessageReaction":{"type":"object","title":"messaging.MessageReaction","required":["business_id","created_at","emoji","message_id","user_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"emoji":{"$ref":"#/components/schemas/std.string.String"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.MessageRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["message_id"],"properties":{"message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"const":"not_sender"}]},"messaging.MessageRemoveRequest":{"type":"object","title":"messaging.MessageRemoveRequest","required":["message_id"],"properties":{"message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.MessageSearchHit":{"type":"object","title":"messaging.MessageSearchHit","required":["message","rank"],"properties":{"message":{"$ref":"#/components/schemas/messaging.Message"},"rank":{"$ref":"#/components/schemas/f32"}}},"messaging.MessageUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["message_id"],"properties":{"message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"const":"not_sender"},{"type":"object","title":"body_too_long","required":["body_too_long"],"properties":{"body_too_long":{"type":"object","title":"body_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"messaging.MessageUpdateRequest":{"type":"object","title":"messaging.MessageUpdateRequest","required":["body","message_id"],"properties":{"body":{"$ref":"#/components/schemas/serde_json.Value"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.MessageUpdateResponse":{"type":"object","title":"messaging.MessageUpdateResponse","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/messaging.Message"}}},"messaging.MessagesListCursor":{"type":"object","title":"messaging.MessagesListCursor","required":["created_at","id"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.MessagesListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"messaging.MessagesListRequest":{"type":"object","title":"messaging.MessagesListRequest","required":["conversation_id","cursor","limit"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"cursor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.MessagesListCursor"}]},"limit":{"$ref":"#/components/schemas/i64"}}},"messaging.MessagesListResponse":{"type":"object","title":"messaging.MessagesListResponse","required":["messages","next_cursor"],"properties":{"messages":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.Message"}},"next_cursor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.MessagesListCursor"}]}}},"messaging.MessagesSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"query_too_long","required":["query_too_long"],"properties":{"query_too_long":{"type":"object","title":"query_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"messaging.MessagesSearchRequest":{"type":"object","title":"messaging.MessagesSearchRequest","required":["limit","query","scope"],"properties":{"limit":{"$ref":"#/components/schemas/i64"},"query":{"$ref":"#/components/schemas/std.string.String"},"scope":{"$ref":"#/components/schemas/messaging.SearchScope"}}},"messaging.MessagesSearchResponse":{"type":"object","title":"messaging.MessagesSearchResponse","required":["hits"],"properties":{"hits":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.MessageSearchHit"}}}},"messaging.MessagesStreamError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"conversation_not_found","required":["conversation_not_found"],"properties":{"conversation_not_found":{"type":"object","title":"conversation_not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"messaging.MessagesStreamFrame":{"oneOf":[{"description":"Authoritative conversation tail. Always the first frame; thereafter\nonly re-sent when a client reconnects (the resync). Clients replace\ntheir state with it.","type":"object","title":"snapshot","required":["kind","snapshot"],"properties":{"kind":{"const":"snapshot"},"snapshot":{"$ref":"#/components/schemas/messaging.SnapshotPayload"}}},{"description":"A message was inserted, edited, or soft-deleted. Carries the full\ncurrent row plus its attachments so the client upserts by `message.id`\n(soft-delete arrives as a row with `deleted_at`/`kind = deleted`).","type":"object","title":"message_upserted","required":["attachments","kind","message"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.MessageAttachment"}},"kind":{"const":"message_upserted"},"message":{"$ref":"#/components/schemas/messaging.Message"}}},{"description":"A reaction was added. Clients insert it keyed by\n`(message_id, user_id, emoji)`.","type":"object","title":"reaction_added","required":["kind","reaction"],"properties":{"kind":{"const":"reaction_added"},"reaction":{"$ref":"#/components/schemas/messaging.MessageReaction"}}},{"description":"A reaction was removed. Carries the reaction's identity so clients\ndrop the matching entry; an unknown tuple is a no-op.","type":"object","title":"reaction_removed","required":["emoji","kind","message_id","user_id"],"properties":{"emoji":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"reaction_removed"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"A participant joined or changed (including soft-leave via `left_at`).\nClients upsert by `participant.business_id`.","type":"object","title":"participant_upserted","required":["kind","participant"],"properties":{"kind":{"const":"participant_upserted"},"participant":{"$ref":"#/components/schemas/messaging.ConversationParticipant"}}},{"description":"A participant row was hard-deleted (conversation teardown reaping its\nrows). Clients drop the participant keyed by `(business_id, role)` —\na business may hold more than one role on a conversation.","type":"object","title":"participant_removed","required":["business_id","kind","role"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"participant_removed"},"role":{"$ref":"#/components/schemas/messaging.ParticipantRole"}}},{"description":"Conversation metadata changed (e.g. archived). Clients replace the\nconversation header.","type":"object","title":"conversation_updated","required":["conversation","kind"],"properties":{"conversation":{"$ref":"#/components/schemas/messaging.Conversation"},"kind":{"const":"conversation_updated"}}},{"description":"A participant's read cursor advanced. Carries the full read-state row\n(`last_read_message_id` / `last_read_at`); clients use it to render\nread receipts against the sender's own messages.","type":"object","title":"read_state_updated","required":["kind","read_state"],"properties":{"kind":{"const":"read_state_updated"},"read_state":{"$ref":"#/components/schemas/messaging.ConversationReadState"}}},{"description":"Ephemeral typing event. Carries a TTL so clients can clear the\nindicator if the typer goes silent; no persistence behind it.","type":"object","title":"typing","required":["business_id","conversation_id","expires_at","kind","user_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"typing"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"Server-driven keepalive so load balancers don't tear down the\nstream during quiet periods. Carries the server's clock so\nclients can flag a stuck stream.","type":"object","title":"heartbeat","required":["generated_at","kind"],"properties":{"generated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"heartbeat"}}},{"type":"object","title":"closed","required":["kind"],"properties":{"kind":{"const":"closed"}}}]},"messaging.MessagesStreamRequest":{"type":"object","title":"messaging.MessagesStreamRequest","required":["client_session_id","conversation_id"],"properties":{"client_session_id":{"description":"Per-tab session id so we can correlate dropped connections in logs.","$ref":"#/components/schemas/uuid.Uuid"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.ParticipantAddError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"conversation_not_found","required":["conversation_not_found"],"properties":{"conversation_not_found":{"type":"object","title":"conversation_not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"messaging.ParticipantAddRequest":{"type":"object","title":"messaging.ParticipantAddRequest","required":["business_id","conversation_id","organization_id","role"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"role":{"$ref":"#/components/schemas/messaging.ParticipantRole"}}},"messaging.ParticipantAddResponse":{"type":"object","title":"messaging.ParticipantAddResponse","required":["participant"],"properties":{"participant":{"$ref":"#/components/schemas/messaging.ConversationParticipant"}}},"messaging.ParticipantRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"messaging.ParticipantRemoveRequest":{"type":"object","title":"messaging.ParticipantRemoveRequest","required":["business_id","conversation_id","role"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"role":{"$ref":"#/components/schemas/messaging.ParticipantRole"}}},"messaging.ParticipantRole":{"oneOf":[{"const":"repairer"},{"const":"supplier"},{"const":"system"},{"const":"observer"},{"const":"partly_staff"}]},"messaging.ParticipantSeat":{"description":"Input shape for the participant set on conversation creation. Mirrors\n`messaging_dal::ParticipantSeat` for wire use.","type":"object","title":"messaging.ParticipantSeat","required":["business_id","organization_id","role"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"role":{"$ref":"#/components/schemas/messaging.ParticipantRole"}}},"messaging.ReactionAddError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_emoji","required":["invalid_emoji"],"properties":{"invalid_emoji":{"type":"object","title":"invalid_emoji","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"message_not_found","required":["message_not_found"],"properties":{"message_not_found":{"type":"object","title":"message_not_found","required":["message_id"],"properties":{"message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"rate_limited","required":["rate_limited"],"properties":{"rate_limited":{"type":"object","title":"rate_limited","required":["retry_after_ms"],"properties":{"retry_after_ms":{"$ref":"#/components/schemas/u64"}}}}}]},"messaging.ReactionAddRequest":{"type":"object","title":"messaging.ReactionAddRequest","required":["emoji","message_id"],"properties":{"emoji":{"description":"Raw emoji character to react with. We own the whole stack, the column\nalready stores the character, and reactions are open-ended — so the\nwire carries the character directly rather than a curated enum. The\nfrontend offers a curated picker; the API accepts any emoji up to\n`REACTION_EMOJI_MAX_CHARS`.","$ref":"#/components/schemas/std.string.String"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.ReactionRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"rate_limited","required":["rate_limited"],"properties":{"rate_limited":{"type":"object","title":"rate_limited","required":["retry_after_ms"],"properties":{"retry_after_ms":{"$ref":"#/components/schemas/u64"}}}}}]},"messaging.ReactionRemoveRequest":{"type":"object","title":"messaging.ReactionRemoveRequest","required":["emoji","message_id"],"properties":{"emoji":{"description":"Emoji character to remove (toggle-off). An unmatched value is a no-op.","$ref":"#/components/schemas/std.string.String"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.ReadStateFilter":{"description":"Conversation-scope filter for `read_state.get`, same shape as the\n`conversations.search` filter (minus pagination). An empty filter is the\nwhole org scope; `participant_user_id` narrows to that user's conversations.","type":"object","title":"messaging.ReadStateFilter","properties":{"include_archived":{"$ref":"#/components/schemas/bool"},"participant_user_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"resource":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.ResourceRef"}]}}},"messaging.ReadStateGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"messaging.ReadStateGetRequest":{"type":"object","title":"messaging.ReadStateGetRequest","properties":{"conversation_ids":{"description":"Explicit conversation set (per-row lookups). Takes precedence over\n`filter` whenever it is `Some` — including `Some([])`, which counts\n*nothing* (empty response), NOT the caller's inbox. To use `filter` or\nthe default inbox, leave this `None`.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"filter":{"description":"Optional scope filter mirroring `conversations.search`. **Absent** →\nunchanged: unread across the caller's own inbox (`read_state ∪\nsubscriptions`). **Present** (even empty) → unread across every\nconversation matching the filter, org-scoped.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.ReadStateFilter"}]}}},"messaging.ReadStateGetResponse":{"type":"object","title":"messaging.ReadStateGetResponse","required":["conversations"],"properties":{"conversations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.ConversationUnread"}}}},"messaging.ReadStateUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"conversation_not_found","required":["conversation_not_found"],"properties":{"conversation_not_found":{"type":"object","title":"conversation_not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"messaging.ReadStateUpdateRequest":{"type":"object","title":"messaging.ReadStateUpdateRequest","required":["conversation_id","last_read_message_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"last_read_message_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.ReadStateUpdateResponse":{"type":"object","title":"messaging.ReadStateUpdateResponse","required":["read_state"],"properties":{"read_state":{"$ref":"#/components/schemas/messaging.ConversationReadState"}}},"messaging.ResourceKind":{"oneOf":[{"const":"job"},{"const":"procurement"}]},"messaging.ResourceRef":{"description":"A `(resource_kind, resource_id)` reference. Closed enum on `kind` so\nextending to new resource types is a one-line addition on both this\ncrate and the underlying DAL.","type":"object","title":"messaging.ResourceRef","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/messaging.ResourceKind"}}},"messaging.SearchScope":{"oneOf":[{"type":"object","title":"conversation","required":["conversation_id","kind"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"conversation"}}},{"type":"object","title":"inbox","required":["kind"],"properties":{"kind":{"const":"inbox"}}}]},"messaging.SnapshotPayload":{"type":"object","title":"messaging.SnapshotPayload","required":["attachments","conversation","generated_at","messages","online_users","participants","reactions","read_state"],"properties":{"attachments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.MessageAttachment"}},"conversation":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/messaging.Conversation"}]},"generated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"messages":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.Message"}},"online_users":{"description":"User ids that currently have an active realtime presence session.\nA subset of the users referenced elsewhere in this snapshot\n(message senders and read-state entries); empty when none of them\nare currently online.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"participants":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.ConversationParticipant"}},"reactions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.MessageReaction"}},"read_state":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.ConversationReadState"}}}},"messaging.Subscription":{"type":"object","title":"messaging.Subscription","required":["business_id","conversation_id","source","subscribed_at","user_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"source":{"$ref":"#/components/schemas/messaging.SubscriptionSource"},"subscribed_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.SubscriptionAddError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"conversation_not_found","required":["conversation_not_found"],"properties":{"conversation_not_found":{"type":"object","title":"conversation_not_found","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"messaging.SubscriptionAddRequest":{"type":"object","title":"messaging.SubscriptionAddRequest","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.SubscriptionRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"messaging.SubscriptionRemoveRequest":{"type":"object","title":"messaging.SubscriptionRemoveRequest","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"messaging.SubscriptionSource":{"oneOf":[{"const":"first_message"},{"const":"manual"},{"const":"resource_assignment"}]},"messaging.SubscriptionsListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"messaging.SubscriptionsListRequest":{"type":"object","title":"messaging.SubscriptionsListRequest","required":["conversation_ids"],"properties":{"conversation_ids":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]}}},"messaging.SubscriptionsListResponse":{"type":"object","title":"messaging.SubscriptionsListResponse","required":["subscriptions"],"properties":{"subscriptions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/messaging.Subscription"}}}},"messaging.TypingBroadcastError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"rate_limited","required":["rate_limited"],"properties":{"rate_limited":{"type":"object","title":"rate_limited","required":["retry_after_ms"],"properties":{"retry_after_ms":{"$ref":"#/components/schemas/u64"}}}}}]},"messaging.TypingBroadcastRequest":{"type":"object","title":"messaging.TypingBroadcastRequest","required":["conversation_id"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"microsoft_graph_onboarding.InitiateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_configured","description":"No Microsoft Graph app is configured for this deployment."},{"const":"no_business","description":"The org has no business to attach the integration to."}]},"microsoft_graph_onboarding.InitiateResponse":{"type":"object","title":"microsoft_graph_onboarding.InitiateResponse","required":["admin_consent_url"],"properties":{"admin_consent_url":{"description":"The Microsoft admin-consent link to share with a tenant admin.","$ref":"#/components/schemas/std.string.String"}}},"microsoft_graph_onboarding.UpdateMailboxesError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found","description":"No Microsoft 365 mail integration with this id belongs to the caller's org."},{"description":"A supplied mailbox address is not a valid email.","type":"object","title":"invalid_input","required":["invalid_input"],"properties":{"invalid_input":{"$ref":"#/components/schemas/std.string.String"}}}]},"microsoft_graph_onboarding.UpdateMailboxesRequest":{"type":"object","title":"microsoft_graph_onboarding.UpdateMailboxesRequest","required":["integration_id"],"properties":{"from_mailbox":{"description":"New sending mailbox. Absent or null ⇒ left unchanged.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"integration_id":{"description":"The id of the `MICROSOFT_GRAPH_MAIL` integration to edit.","$ref":"#/components/schemas/uuid.Uuid"},"read_mailbox":{"description":"New reading mailbox. Undefined ⇒ left unchanged; null ⇒ cleared.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"ml.AutoEstimateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found","description":"Job does not exist OR has no images to estimate from."}]},"ml.AutoEstimateGetRequest":{"type":"object","title":"ml.AutoEstimateGetRequest","required":["job_id","steps"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"model":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ml.ModelTier"}]},"priority":{"$ref":"#/components/schemas/ml.RequestPriority"},"steps":{"$ref":"#/components/schemas/ml.RequestedSteps"}}},"ml.AutoEstimateGetResponse":{"type":"object","title":"ml.AutoEstimateGetResponse","required":["context_selection"],"properties":{"context_selection":{"$ref":"#/components/schemas/ml.StepStatus"},"oem_parts":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ml.StepStatus"}]},"raw_parts":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ml.StepStatus"}]}}},"ml.AutomatchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"description":"Rejected here rather than inside ml-server's own validation, so the caller\ngets the limit back instead of a 422 from two services away.","type":"object","title":"invalid_request","required":["invalid_request"],"properties":{"invalid_request":{"description":"Rejected here rather than inside ml-server's own validation, so the caller\ngets the limit back instead of a 422 from two services away.","type":"object","title":"invalid_request","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"ml.AutomatchGetRequest":{"type":"object","title":"ml.AutomatchGetRequest","required":["chassis_number","queries"],"properties":{"chassis_number":{"description":"The vehicle to match against. Results are cached per vehicle, not per job.","$ref":"#/components/schemas/std.string.String"},"context_queries":{"description":"Caller-supplied part lines used only as matching context. They do not key the\ncache: a stored result is served whatever context it was matched with.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"priority":{"$ref":"#/components/schemas/ml.RequestPriority"},"queries":{"description":"Free-text part lines, in the caller's own order.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"ml.AutomatchGetResponse":{"type":"object","title":"ml.AutomatchGetResponse","required":["results"],"properties":{"results":{"description":"One entry per request query, in request order.","type":"array","items":{"$ref":"#/components/schemas/ml.QueryStatus"}}}},"ml.ModelTier":{"oneOf":[{"const":"default"},{"const":"fast"},{"const":"ultra_fast"}]},"ml.ProxyError":{"oneOf":[{"description":"You have failed to provide a valid authentication token.","type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden","description":"The caller lacks permission to access this resource."},{"description":"An error which occurs when proxying a request to ml-server.","type":"object","title":"proxy","required":["proxy"],"properties":{"proxy":{"$ref":"#/components/schemas/std.string.String"}}}]},"ml.QueryStatus":{"oneOf":[{"type":"object","title":"completed","required":["completed"],"properties":{"completed":{"type":"object","title":"completed","required":["stale"],"properties":{"data":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"stale":{"$ref":"#/components/schemas/bool"}}}}},{"type":"object","title":"in_progress","required":["in_progress"],"properties":{"in_progress":{"type":"object","title":"in_progress","required":["retry_after"],"properties":{"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"type":"object","title":"failed","required":["failed"],"properties":{"failed":{"type":"object","title":"failed","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"ml.RepairMethodApplicability":{"type":"object","title":"ml.RepairMethodApplicability","required":["make","model_family","year_from","year_to"],"properties":{"make":{"$ref":"#/components/schemas/std.string.String"},"model_family":{"$ref":"#/components/schemas/std.string.String"},"year_from":{"$ref":"#/components/schemas/u16"},"year_to":{"$ref":"#/components/schemas/u16"}}},"ml.RepairMethodCitation":{"type":"object","title":"ml.RepairMethodCitation","required":["document_id","page_end","page_start","section_path","source_archive","source_document","source_hash"],"properties":{"document_id":{"$ref":"#/components/schemas/std.string.String"},"page_end":{"$ref":"#/components/schemas/u32"},"page_start":{"$ref":"#/components/schemas/u32"},"section_path":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"source_archive":{"$ref":"#/components/schemas/std.string.String"},"source_document":{"$ref":"#/components/schemas/std.string.String"},"source_hash":{"$ref":"#/components/schemas/std.string.String"}}},"ml.RepairMethodEvidence":{"type":"object","title":"ml.RepairMethodEvidence","required":["applicability","chunk_id","citation","content","content_hash","image_sha256","modality","semantic_score"],"properties":{"applicability":{"$ref":"#/components/schemas/ml.RepairMethodApplicability"},"chunk_id":{"$ref":"#/components/schemas/std.string.String"},"citation":{"$ref":"#/components/schemas/ml.RepairMethodCitation"},"content":{"$ref":"#/components/schemas/std.string.String"},"content_hash":{"$ref":"#/components/schemas/std.string.String"},"image_sha256":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"modality":{"$ref":"#/components/schemas/ml.RepairMethodModality"},"semantic_score":{"$ref":"#/components/schemas/f64"}}},"ml.RepairMethodLookupError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"unavailable"},{"type":"object","title":"rate_limited","required":["rate_limited"],"properties":{"rate_limited":{"type":"object","title":"rate_limited","required":["retry_after_seconds"],"properties":{"retry_after_seconds":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]}}}}},{"const":"invalid_query"},{"const":"incomplete_vehicle_scope"}]},"ml.RepairMethodLookupRequest":{"type":"object","title":"ml.RepairMethodLookupRequest","required":["job_id","query"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"query":{"$ref":"#/components/schemas/std.string.String"}}},"ml.RepairMethodLookupResult":{"oneOf":[{"type":"object","title":"ready","required":["evidence","release","status"],"properties":{"evidence":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ml.RepairMethodEvidence"}},"release":{"$ref":"#/components/schemas/ml.RepairMethodRelease"},"status":{"const":"ready"}}},{"type":"object","title":"unavailable","required":["evidence","release","status","unavailable_reason"],"properties":{"evidence":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/ml.RepairMethodEvidence"}},"release":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ml.RepairMethodRelease"}]},"status":{"const":"unavailable"},"unavailable_reason":{"$ref":"#/components/schemas/ml.RepairMethodUnavailableReason"}}}]},"ml.RepairMethodModality":{"oneOf":[{"const":"text"},{"const":"image"}]},"ml.RepairMethodRelease":{"type":"object","title":"ml.RepairMethodRelease","required":["chunker_version","embedding_dimensions","embedding_model","extractor_version","release_id"],"properties":{"chunker_version":{"$ref":"#/components/schemas/std.string.String"},"embedding_dimensions":{"$ref":"#/components/schemas/u32"},"embedding_model":{"$ref":"#/components/schemas/std.string.String"},"extractor_version":{"$ref":"#/components/schemas/std.string.String"},"release_id":{"$ref":"#/components/schemas/std.string.String"}}},"ml.RepairMethodUnavailableReason":{"oneOf":[{"const":"release_unavailable"},{"const":"no_applicable_evidence"}]},"ml.RequestPriority":{"oneOf":[{"const":"realtime"},{"const":"background"}]},"ml.RequestedSteps":{"oneOf":[{"const":"context_selection"},{"const":"raw_parts"},{"const":"oem_parts"}]},"ml.StepStatus":{"oneOf":[{"type":"object","title":"completed","required":["completed"],"properties":{"completed":{"type":"object","title":"completed","required":["stale"],"properties":{"data":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"stale":{"$ref":"#/components/schemas/bool"}}}}},{"type":"object","title":"in_progress","required":["in_progress"],"properties":{"in_progress":{"type":"object","title":"in_progress","required":["retry_after"],"properties":{"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"type":"object","title":"failed","required":["failed"],"properties":{"failed":{"type":"object","title":"failed","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"network_validation.Ignored":{"type":"object","title":"network_validation.Ignored","required":["at","by","message"],"properties":{"at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"by":{"$ref":"#/components/schemas/uuid.Uuid"},"message":{"$ref":"#/components/schemas/std.string.String"}}},"network_validation.NetworkViolation":{"type":"object","title":"network_validation.NetworkViolation","required":["associations","country_code","created_at","id","last_seen_at","metadata","node_id","status","violation_code","violation_key"],"properties":{"associations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/network_validation.ViolationAssociation"}},"country_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"last_seen_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"node_id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/network_validation.NetworkViolationStatus"},"violation_code":{"$ref":"#/components/schemas/std.string.String"},"violation_key":{"$ref":"#/components/schemas/std.string.String"}}},"network_validation.NetworkViolationStatus":{"oneOf":[{"type":"object","title":"unresolved","required":["type"],"properties":{"type":{"const":"unresolved"}}},{"type":"object","title":"resolved","required":["type"],"properties":{"type":{"const":"resolved"}}},{"type":"object","title":"network_validation.Ignored","required":["at","by","message","type"],"properties":{"at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"by":{"$ref":"#/components/schemas/uuid.Uuid"},"message":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"ignored"}}}]},"network_validation.ViolationAssociation":{"type":"object","title":"network_validation.ViolationAssociation","required":["business_id","organization_id"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"network_validation.ViolationOrderBy":{"oneOf":[{"const":"node_id"}]},"network_validation_connections_list.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"network_validation_connections_list.Request":{"type":"object","title":"network_validation_connections_list.Request","required":["violation_code"],"properties":{"violation_code":{"$ref":"#/components/schemas/std.string.String"}}},"network_validation_connections_list.Response":{"type":"object","title":"network_validation_connections_list.Response","required":["connections"],"properties":{"connections":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.TagConnection"}}}},"network_validation_connections_update.ConnectionOperation":{"oneOf":[{"type":"object","title":"insert","required":["insert"],"properties":{"insert":{"type":"object","title":"insert","required":["source","target"],"properties":{"source":{"$ref":"#/components/schemas/business_network.Tag"},"target":{"$ref":"#/components/schemas/business_network.Tag"}}}}},{"type":"object","title":"remove","required":["remove"],"properties":{"remove":{"type":"object","title":"remove","required":["source","target"],"properties":{"source":{"$ref":"#/components/schemas/business_network.Tag"},"target":{"$ref":"#/components/schemas/business_network.Tag"}}}}}]},"network_validation_connections_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_operations","required":["too_many_operations"],"properties":{"too_many_operations":{"type":"object","title":"too_many_operations","required":["count"],"properties":{"count":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"unknown_violation_code","required":["unknown_violation_code"],"properties":{"unknown_violation_code":{"type":"object","title":"unknown_violation_code","required":["code"],"properties":{"code":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_tag_id","required":["invalid_tag_id"],"properties":{"invalid_tag_id":{"type":"object","title":"invalid_tag_id","required":["tag"],"properties":{"tag":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"conflicting_operations","required":["conflicting_operations"],"properties":{"conflicting_operations":{"type":"object","title":"conflicting_operations","required":["source_tag","target_tag"],"properties":{"source_tag":{"$ref":"#/components/schemas/std.string.String"},"target_tag":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"network_validation_connections_update.Request":{"type":"object","title":"network_validation_connections_update.Request","required":["connections","violation_code"],"properties":{"connections":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/network_validation_connections_update.ConnectionOperation"}},"violation_code":{"$ref":"#/components/schemas/std.string.String"}}},"network_validation_connections_update.Response":{"type":"object","title":"network_validation_connections_update.Response","required":["connections"],"properties":{"connections":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.TagConnection"}}}},"network_validation_violations_search.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"}]},"network_validation_violations_search.Request":{"type":"object","title":"network_validation_violations_search.Request","properties":{"associated_entities":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/network_validation.ViolationAssociation"}}]},"country_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"node_ids":{"description":"Nodes are the source organization that produced a given violation.\nFor business rules this could be the source or the target depending on the optimization path taken by the developer","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"order_by":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/network_validation.ViolationOrderBy"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"},"status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_network.StatusFilter"}]},"violation_codes":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]}}},"network_validation_violations_update.Action":{"oneOf":[{"const":"re_verify"},{"type":"object","title":"ignore","required":["ignore"],"properties":{"ignore":{"type":"object","title":"ignore","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"network_validation_violations_update.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"violation_not_found"},{"type":"object","title":"organization_not_found","required":["organization_not_found"],"properties":{"organization_not_found":{"type":"object","title":"organization_not_found","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"unknown_violation_code","required":["unknown_violation_code"],"properties":{"unknown_violation_code":{"type":"object","title":"unknown_violation_code","required":["code"],"properties":{"code":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"ignore_message_too_short"}]},"network_validation_violations_update.Request":{"type":"object","title":"network_validation_violations_update.Request","required":["action","target"],"properties":{"action":{"$ref":"#/components/schemas/network_validation_violations_update.Action"},"target":{"$ref":"#/components/schemas/network_validation_violations_update.Target"}}},"network_validation_violations_update.Response":{"type":"object","title":"network_validation_violations_update.Response","required":["violations"],"properties":{"violations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/network_validation.NetworkViolation"}}}},"network_validation_violations_update.Target":{"oneOf":[{"type":"object","title":"violation","required":["violation"],"properties":{"violation":{"type":"object","title":"violation","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"node","required":["node"],"properties":{"node":{"type":"object","title":"node","required":["organization_id","violation_code"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"violation_code":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"network_validation_violations_update_many.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_ids","required":["too_many_ids"],"properties":{"too_many_ids":{"type":"object","title":"too_many_ids","required":["count"],"properties":{"count":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"unknown_violation_code","required":["unknown_violation_code"],"properties":{"unknown_violation_code":{"type":"object","title":"unknown_violation_code","required":["code"],"properties":{"code":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"ignore_message_too_short"}]},"network_validation_violations_update_many.Request":{"type":"object","title":"network_validation_violations_update_many.Request","required":["action","ids"],"properties":{"action":{"$ref":"#/components/schemas/network_validation_violations_update.Action"},"ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"network_validation_violations_update_many.Response":{"type":"object","title":"network_validation_violations_update_many.Response","required":["violations"],"properties":{"violations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/network_validation.NetworkViolation"}}}},"notification.Business":{"type":"object","title":"notification.Business","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"notification.Job":{"type":"object","title":"notification.Job","required":["id","job_number","source_app"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"source_app":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/notification.SourceApp"}]}}},"notification.Notification":{"type":"object","title":"notification.Notification","required":["business_id","created_at","id","organization_id","payload","status"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"payload":{"$ref":"#/components/schemas/notification.NotificationPayload"},"status":{"$ref":"#/components/schemas/notification.NotificationStatus"}}},"notification.NotificationAcknowledgeError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}]},"notification.NotificationAcknowledgeRequest":{"allOf":[{"$ref":"#/components/schemas/notification.NotificationAcknowledgeType"},{"type":"object","title":"notification.NotificationAcknowledgeRequest","properties":{}}]},"notification.NotificationAcknowledgeResponse":{"type":"object","title":"notification.NotificationAcknowledgeResponse","properties":{}},"notification.NotificationAcknowledgeType":{"oneOf":[{"type":"object","title":"read_all","required":["type"],"properties":{"type":{"const":"read_all"}}},{"description":"Mark all unread specified notifications as acknowledged","type":"object","title":"read_specific","required":["notification_ids","type"],"properties":{"notification_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"type":{"const":"read_specific"}}}]},"notification.NotificationCountError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"notification.NotificationCountRequest":{"type":"object","title":"notification.NotificationCountRequest","properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"notification.NotificationCountResponse":{"type":"object","title":"notification.NotificationCountResponse","required":["unread"],"properties":{"unread":{"$ref":"#/components/schemas/u64"}}},"notification.NotificationEntities":{"type":"object","title":"notification.NotificationEntities","properties":{"businesses":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/notification.Business"}}]},"jobs":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/notification.Job"}}]},"offer_requests":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/notification.OfferRequest"}}]},"orders":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/notification.Order"}}]},"procurements":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/notification.Procurement"}}]}}},"notification.NotificationListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"}]},"notification.NotificationListRequest":{"type":"object","title":"notification.NotificationListRequest","properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"pagination":{"$ref":"#/components/schemas/PageRequest"}}},"notification.NotificationListResponse":{"type":"object","title":"notification.NotificationListResponse","required":["entities","items","pagination"],"properties":{"entities":{"$ref":"#/components/schemas/notification.NotificationEntities"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/notification.Notification"}},"pagination":{"$ref":"#/components/schemas/ForwardPagination"}}},"notification.NotificationPayload":{"oneOf":[{"type":"object","title":"supplier_order_created","required":["order_id","type"],"properties":{"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"supplier_order_created"}}},{"type":"object","title":"supplier_order_cancelled","required":["order_id","type"],"properties":{"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"supplier_order_cancelled"}}},{"type":"object","title":"supplier_offer_request_created","required":["offer_request_id","type"],"properties":{"offer_request_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"supplier_offer_request_created"}}},{"type":"object","title":"repairer_order_confirmed","required":["job_id","order_id","type"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"repairer_order_confirmed"}}},{"type":"object","title":"repairer_order_cancelled","required":["job_id","order_id","type"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"repairer_order_cancelled"}}},{"type":"object","title":"repairer_offer_request_returned","required":["offer_request_id","type"],"properties":{"offer_request_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"repairer_offer_request_returned"}}},{"type":"object","title":"repairer_offer_collection_complete","required":["job_id","type"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"repairer_offer_collection_complete"}}},{"type":"object","title":"message_received","required":["conversation_id","message_id","sender_business_id","type"],"properties":{"conversation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"message_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sender_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"message_received"}}},{"description":"A procurement changed status. Resolves against `NotificationEntities` like\nthe order/offer variants above: the payload carries only ids + the new\nstatus + the acting side, and the feed loads the procurement (reference,\njob, party business ids) at read time.","type":"object","title":"procurement_status_updated","required":["procurement_id","side","status","type"],"properties":{"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"},"side":{"description":"Which side performed the change. The recipient is the opposite side.","$ref":"#/components/schemas/notification.Side"},"status":{"description":"The status the procurement moved to.","$ref":"#/components/schemas/notification.ProcurementStatus"},"type":{"const":"procurement_status_updated"}}}]},"notification.NotificationStatus":{"oneOf":[{"const":"read"},{"const":"unread"}]},"notification.OfferRequest":{"type":"object","title":"notification.OfferRequest","required":["business_id","id","job_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"notification.Order":{"type":"object","title":"notification.Order","required":["external_id","id","supplier_id"],"properties":{"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"notification.Procurement":{"description":"Minimal procurement projection the notification feed resolves for a\n[`crate::NotificationPayload::ProcurementStatusUpdated`]. Carries only what the\nclient renders: the display reference, the job to chain to (job number +\nsource app), and the buyer/supplier business ids so the client can name the\nparty that acted (selected by the payload's [`Side`]).","type":"object","title":"notification.Procurement","required":["buyer_business_id","id","job_id","reference","supplier_business_id"],"properties":{"buyer_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reference":{"$ref":"#/components/schemas/std.string.String"},"supplier_business_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"notification.ProcurementStatus":{"oneOf":[{"const":"offers_requested"},{"const":"offers_sent"},{"const":"order_requested"},{"const":"order_confirmed"},{"const":"off_network"},{"const":"closed"}]},"notification.Side":{"oneOf":[{"const":"buyer"},{"const":"supplier"}]},"notification.SourceApp":{"oneOf":[{"const":"repair"},{"const":"workshop"}]},"offer_collect_engine.AlgorithmState":{"oneOf":[{"type":"object","title":"offer_collect_engine.GradualExpansionState","required":["batch_cursor","phase","version"],"properties":{"batch_cursor":{"$ref":"#/components/schemas/u32"},"phase":{"$ref":"#/components/schemas/offer_collect_engine.GradualExpansionPhase"},"version":{"const":"ge_v1_0_3h"}}},{"type":"object","title":"offer_collect_engine.GradualExpansionState","required":["batch_cursor","phase","version"],"properties":{"batch_cursor":{"$ref":"#/components/schemas/u32"},"phase":{"$ref":"#/components/schemas/offer_collect_engine.GradualExpansionPhase"},"version":{"const":"ge_v1_1_3h"}}},{"type":"object","title":"offer_collect_engine.PriorityMatchState","required":["batch_cursor","phase","version"],"properties":{"batch_cursor":{"$ref":"#/components/schemas/u32"},"phase":{"$ref":"#/components/schemas/offer_collect_engine.PriorityMatchPhase"},"version":{"const":"pm_v1"}}}]},"offer_collect_engine.AlgorithmVersion":{"oneOf":[{"const":"gradual_expansion_v1"},{"const":"gradual_expansion_v1_1"},{"const":"priority_match"}]},"offer_collect_engine.BatchSentInfo":{"type":"object","title":"offer_collect_engine.BatchSentInfo","required":["offer_request_ids","supplier_ids"],"properties":{"offer_request_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplier_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"offer_collect_engine.CancelError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"conflict","required":["conflict"],"properties":{"conflict":{"type":"object","title":"conflict","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"bad_request","required":["bad_request"],"properties":{"bad_request":{"type":"object","title":"bad_request","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"offer_collect_engine.CancelRequest":{"type":"object","title":"offer_collect_engine.CancelRequest","required":["session_id"],"properties":{"reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.CancelResponse":{"type":"object","title":"offer_collect_engine.CancelResponse","properties":{}},"offer_collect_engine.CheckRequest":{"type":"object","title":"offer_collect_engine.CheckRequest","required":["session_id"],"properties":{"session_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.CheckResponse":{"type":"object","title":"offer_collect_engine.CheckResponse","required":["algorithm_state","batch_sent","conditions_met","should_stop","status"],"properties":{"algorithm_state":{"$ref":"#/components/schemas/offer_collect_engine.AlgorithmState"},"batch_sent":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_collect_engine.BatchSentInfo"}]},"conditions_met":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.ConditionResult"}},"should_stop":{"$ref":"#/components/schemas/bool"},"status":{"$ref":"#/components/schemas/std.string.String"}}},"offer_collect_engine.ConditionResult":{"type":"object","title":"offer_collect_engine.ConditionResult","required":["condition","evaluated_value","met"],"properties":{"condition":{"$ref":"#/components/schemas/offer_collect_engine.StoppingCondition"},"evaluated_value":{"$ref":"#/components/schemas/serde_json.Value"},"met":{"$ref":"#/components/schemas/bool"}}},"offer_collect_engine.ContinueSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"conflict","required":["conflict"],"properties":{"conflict":{"type":"object","title":"conflict","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"bad_request","required":["bad_request"],"properties":{"bad_request":{"type":"object","title":"bad_request","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"offer_collect_engine.ContinueSearchRequest":{"type":"object","title":"offer_collect_engine.ContinueSearchRequest","required":["max_seconds","session_id"],"properties":{"max_seconds":{"$ref":"#/components/schemas/u64"},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.ContinueSearchResponse":{"type":"object","title":"offer_collect_engine.ContinueSearchResponse","required":["all_stopping_conditions","session_id"],"properties":{"all_stopping_conditions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.StoppingCondition"}},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.CreateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"conflict","required":["conflict"],"properties":{"conflict":{"type":"object","title":"conflict","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"bad_request","required":["bad_request"],"properties":{"bad_request":{"type":"object","title":"bad_request","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"offer_collect_engine.CreateRequest":{"type":"object","title":"offer_collect_engine.CreateRequest","required":["job_id","parts"],"properties":{"algorithm_version":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_collect_engine.AlgorithmVersion"}]},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parts":{"$ref":"#/components/schemas/serde_json.Value"},"stopping_conditions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.StoppingCondition"}}}},"offer_collect_engine.CreateResponse":{"type":"object","title":"offer_collect_engine.CreateResponse","required":["algorithm_state","session_id","status"],"properties":{"algorithm_state":{"$ref":"#/components/schemas/offer_collect_engine.AlgorithmState"},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/std.string.String"}}},"offer_collect_engine.EvaluateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_collect_engine.EventView":{"type":"object","title":"offer_collect_engine.EventView","required":["created_at","event_data","event_kind","id"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"event_data":{"$ref":"#/components/schemas/serde_json.Value"},"event_kind":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.ExtendRequest":{"type":"object","title":"offer_collect_engine.ExtendRequest","required":["session_id","stopping_conditions"],"properties":{"session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"stopping_conditions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.StoppingCondition"}}}},"offer_collect_engine.ExtendResponse":{"type":"object","title":"offer_collect_engine.ExtendResponse","required":["all_stopping_conditions","session_id"],"properties":{"all_stopping_conditions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.StoppingCondition"}},"session_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.GetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_collect_engine.GetRequest":{"type":"object","title":"offer_collect_engine.GetRequest","required":["session_id"],"properties":{"session_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.GetResponse":{"type":"object","title":"offer_collect_engine.GetResponse","required":["events","offer_request_ids","session"],"properties":{"events":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.EventView"}},"offer_request_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"session":{"$ref":"#/components/schemas/offer_collect_engine.SessionView"}}},"offer_collect_engine.GradualExpansionPhase":{"oneOf":[{"const":"recommended"},{"const":"approved"},{"const":"exhausted"}]},"offer_collect_engine.GradualExpansionState":{"type":"object","title":"offer_collect_engine.GradualExpansionState","required":["batch_cursor","phase"],"properties":{"batch_cursor":{"$ref":"#/components/schemas/u32"},"phase":{"$ref":"#/components/schemas/offer_collect_engine.GradualExpansionPhase"}}},"offer_collect_engine.ListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"offer_collect_engine.ListRequest":{"type":"object","title":"offer_collect_engine.ListRequest","required":["job_id"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_collect_engine.ListResponse":{"type":"object","title":"offer_collect_engine.ListResponse","required":["sessions"],"properties":{"sessions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.SessionWithEvents"}}}},"offer_collect_engine.PriorityMatchPhase":{"oneOf":[{"const":"recommended","description":"Initial slot-budgeted recommended wave evaluated at session creation."},{"const":"approved","description":"Escalating waves drawn from approved lanes after the recommended wave."},{"const":"exhausted","description":"Approved-lane queue is empty; the algorithm returns Wait from here and\nthe session waits for normal stopping conditions to terminate it."}]},"offer_collect_engine.PriorityMatchState":{"type":"object","title":"offer_collect_engine.PriorityMatchState","required":["batch_cursor","phase"],"properties":{"batch_cursor":{"$ref":"#/components/schemas/u32"},"phase":{"$ref":"#/components/schemas/offer_collect_engine.PriorityMatchPhase"}}},"offer_collect_engine.SessionView":{"type":"object","title":"offer_collect_engine.SessionView","required":["algorithm","algorithm_state","algorithm_version","config","created_at","id","job_id","parts","repairer_id","site_id","status","stopped_reason","updated_at"],"properties":{"algorithm":{"$ref":"#/components/schemas/std.string.String"},"algorithm_state":{"$ref":"#/components/schemas/offer_collect_engine.AlgorithmState"},"algorithm_version":{"$ref":"#/components/schemas/std.string.String"},"config":{"$ref":"#/components/schemas/serde_json.Value"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parts":{"$ref":"#/components/schemas/serde_json.Value"},"repairer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/std.string.String"},"stopped_reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"offer_collect_engine.SessionWithEvents":{"type":"object","title":"offer_collect_engine.SessionWithEvents","required":["events","session"],"properties":{"events":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_collect_engine.EventView"}},"session":{"$ref":"#/components/schemas/offer_collect_engine.SessionView"}}},"offer_collect_engine.StoppingCondition":{"oneOf":[{"type":"object","title":"price_ceiling","required":["kind","max_total_cents"],"properties":{"kind":{"const":"price_ceiling"},"max_total_cents":{"$ref":"#/components/schemas/i64"}}},{"type":"object","title":"basket_count","required":["kind","min_baskets"],"properties":{"kind":{"const":"basket_count"},"min_baskets":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"time_elapsed","required":["kind","max_seconds"],"properties":{"kind":{"const":"time_elapsed"},"max_seconds":{"$ref":"#/components/schemas/u64"}}}]},"offer_collect_engine.UpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"conflict","required":["conflict"],"properties":{"conflict":{"type":"object","title":"conflict","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"bad_request","required":["bad_request"],"properties":{"bad_request":{"type":"object","title":"bad_request","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"offer_recommendation.Activation":{"oneOf":[{"type":"object","title":"unconditional","required":["kind"],"properties":{"kind":{"const":"unconditional"}}},{"type":"object","title":"conditional","required":["condition","kind"],"properties":{"condition":{"$ref":"#/components/schemas/offer_recommendation.ConditionOutcome"},"kind":{"const":"conditional"}}}]},"offer_recommendation.ConditionObservation":{"oneOf":[{"type":"object","title":"make","required":["atom","observed"],"properties":{"atom":{"const":"make"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"model","required":["atom","observed"],"properties":{"atom":{"const":"model"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"vehicle_age_months","required":["atom","observed"],"properties":{"atom":{"const":"vehicle_age_months"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"job_kind","required":["atom","observed"],"properties":{"atom":{"const":"job_kind"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.JobKind"}]}}}]},"offer_recommendation.ConditionOutcome":{"oneOf":[{"type":"object","title":"true","required":["type"],"properties":{"type":{"const":"true"}}},{"type":"object","title":"and","required":["clauses","truth","type"],"properties":{"clauses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.ConditionOutcome"}},"truth":{"$ref":"#/components/schemas/offer_recommendation.Truth"},"type":{"const":"and"}}},{"type":"object","title":"or","required":["clauses","truth","type"],"properties":{"clauses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.ConditionOutcome"}},"truth":{"$ref":"#/components/schemas/offer_recommendation.Truth"},"type":{"const":"or"}}},{"type":"object","title":"not","required":["inner","truth","type"],"properties":{"inner":{"$ref":"#/components/schemas/offer_recommendation.ConditionOutcome"},"truth":{"$ref":"#/components/schemas/offer_recommendation.Truth"},"type":{"const":"not"}}},{"type":"object","title":"atom","required":["observed","truth","type"],"properties":{"observed":{"$ref":"#/components/schemas/offer_recommendation.ConditionObservation"},"truth":{"$ref":"#/components/schemas/offer_recommendation.Truth"},"type":{"const":"atom"}}}]},"offer_recommendation.Considered":{"type":"object","title":"offer_recommendation.Considered","required":["record","sufficiency","trials"],"properties":{"record":{"$ref":"#/components/schemas/offer_recommendation.RecordRef"},"sufficiency":{"$ref":"#/components/schemas/offer_recommendation.Sufficiency"},"trials":{"$ref":"#/components/schemas/u64"}}},"offer_recommendation.DeferReason":{"oneOf":[{"const":"group_limit_reached"}]},"offer_recommendation.Disposition":{"oneOf":[{"type":"object","title":"contact","required":["kind"],"properties":{"kind":{"const":"contact"}}},{"type":"object","title":"defer","required":["kind","reason"],"properties":{"kind":{"const":"defer"},"reason":{"$ref":"#/components/schemas/offer_recommendation.DeferReason"}}},{"type":"object","title":"skip","required":["kind","reason"],"properties":{"kind":{"const":"skip"},"reason":{"$ref":"#/components/schemas/offer_recommendation.SkipReason"}}},{"type":"object","title":"settled","required":["kind","state"],"properties":{"kind":{"const":"settled"},"state":{"$ref":"#/components/schemas/offer_recommendation.ProcurementState"}}}]},"offer_recommendation.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_recommendation.FetchRequestV1":{"type":"object","title":"offer_recommendation.FetchRequestV1","required":["interchange_qualifiers"],"properties":{"interchange_depth":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"interchange_qualifiers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.Qualifier"}}}},"offer_recommendation.FilterAtomOutcome":{"type":"object","title":"offer_recommendation.FilterAtomOutcome","required":["observed","path","truth"],"properties":{"observed":{"$ref":"#/components/schemas/offer_recommendation.FilterObservation"},"path":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/u32"}},"truth":{"$ref":"#/components/schemas/offer_recommendation.Truth"}}},"offer_recommendation.FilterObservation":{"oneOf":[{"type":"object","title":"supply_type","required":["atom","observed"],"properties":{"atom":{"const":"supply_type"},"observed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.SupplyType"}}}},{"type":"object","title":"supply_type_only","required":["atom","observed"],"properties":{"atom":{"const":"supply_type_only"},"observed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.SupplyType"}}}},{"type":"object","title":"preferred","required":["atom","observed"],"properties":{"atom":{"const":"preferred"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"preferred_rank","required":["atom","observed"],"properties":{"atom":{"const":"preferred_rank"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"distance","required":["atom","kilometres"],"properties":{"atom":{"const":"distance"},"kilometres":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"has_stock","required":["atom","observed"],"properties":{"atom":{"const":"has_stock"},"observed":{"$ref":"#/components/schemas/offer_recommendation.StockPresence"}}},{"type":"object","title":"has_yard_vehicle","required":["atom","observed"],"properties":{"atom":{"const":"has_yard_vehicle"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"yard_vehicle_count","required":["atom","observed"],"properties":{"atom":{"const":"yard_vehicle_count"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"same_zone","required":["atom","repairer","supplier"],"properties":{"atom":{"const":"same_zone"},"repairer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Zone"}]},"supplier":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.Zone"}}}},{"type":"object","title":"supplier","required":["atom"],"properties":{"atom":{"const":"supplier"}}},{"type":"object","title":"metrics_rate","required":["atom","observed"],"properties":{"atom":{"const":"metrics_rate"},"observed":{"type":"object","title":"offer_recommendation.Metric<rust_decimal.Decimal>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/offer_recommendation.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"metrics_duration","required":["atom","observed"],"properties":{"atom":{"const":"metrics_duration"},"observed":{"type":"object","title":"offer_recommendation.Metric<i64>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/offer_recommendation.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}}}}]},"offer_recommendation.GroupActivation":{"type":"object","title":"offer_recommendation.GroupActivation","required":["activation","group"],"properties":{"activation":{"$ref":"#/components/schemas/offer_recommendation.Activation"},"group":{"$ref":"#/components/schemas/u32"}}},"offer_recommendation.Identity":{"type":"object","title":"offer_recommendation.Identity","required":["brand_id","mpn"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"offer_recommendation.JobKind":{"oneOf":[{"const":"insurance"},{"const":"private"}]},"offer_recommendation.NzRegion":{"oneOf":[{"const":"north_island"},{"const":"south_island"}]},"offer_recommendation.OffersEvaluateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"unsupported","required":["unsupported"],"properties":{"unsupported":{"type":"object","title":"unsupported","required":["code","message"],"properties":{"code":{"$ref":"#/components/schemas/offers.Unsupported"},"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"offer_recommendation.PartScope":{"oneOf":[{"type":"object","title":"supplier_hca","required":["hca","kind"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"supplier_hca"}}},{"type":"object","title":"supplier_make_hca","required":["hca","kind"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"supplier_make_hca"}}}]},"offer_recommendation.PolicyRef":{"type":"object","title":"offer_recommendation.PolicyRef","required":["binding_id","policy_id","rule_id"],"properties":{"binding_id":{"$ref":"#/components/schemas/uuid.Uuid"},"policy_id":{"$ref":"#/components/schemas/uuid.Uuid"},"rule_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_recommendation.ProcurementState":{"oneOf":[{"const":"pending"},{"const":"quoted"},{"const":"declined"},{"const":"closed"}]},"offer_recommendation.Provenance":{"type":"object","title":"offer_recommendation.Provenance","properties":{"considered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.Considered"}},"used":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.RecordRef"}}}},"offer_recommendation.Qualifier":{"oneOf":[{"type":"object","title":"exact_replacement","required":["type"],"properties":{"type":{"const":"exact_replacement"}}},{"type":"object","title":"alternate_finish","required":["type"],"properties":{"type":{"const":"alternate_finish"}}},{"type":"object","title":"usable","required":["type"],"properties":{"type":{"const":"usable"}}},{"type":"object","title":"supersedes","required":["type"],"properties":{"type":{"const":"supersedes"}}}]},"offer_recommendation.Ranking":{"type":"object","title":"offer_recommendation.Ranking","required":["decided_at","decision_id","policy","verdict"],"properties":{"decided_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"decision_id":{"$ref":"#/components/schemas/uuid.Uuid"},"policy":{"$ref":"#/components/schemas/offer_recommendation.PolicyRef"},"verdict":{"$ref":"#/components/schemas/offer_recommendation.Verdict"}}},"offer_recommendation.RecordRef":{"type":"object","title":"offer_recommendation.RecordRef","required":["lookback","scope"],"properties":{"lookback":{"$ref":"#/components/schemas/supplier_metrics_api.lookback.Lookback"},"scope":{"$ref":"#/components/schemas/offer_recommendation.RecordScope"}}},"offer_recommendation.RecordScope":{"oneOf":[{"type":"object","title":"supplier","required":["level","scope"],"properties":{"level":{"const":"supplier"},"scope":{"$ref":"#/components/schemas/offer_recommendation.SupplierScope"}}},{"type":"object","title":"part","required":["level","scope"],"properties":{"level":{"const":"part"},"scope":{"$ref":"#/components/schemas/offer_recommendation.PartScope"}}}]},"offer_recommendation.RepairerRecommendRequestV1":{"type":"object","title":"offer_recommendation.RepairerRecommendRequestV1","properties":{"pipelines":{"description":"override the pipelines for the request, otherwise the pipelines will be fetched from the\nbna based on the job","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"oneOf":[{"description":"the array of stages acts as an priority ordered list. evaluation is stopped after the first\nsuccessful stage","type":"object","title":"waterfall<basket_builder_offer.Preference, basket_builder.Filter>","required":["rank","stages","type"],"properties":{"rank":{"$ref":"#/components/schemas/basket_builder.Rank"},"stages":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Stage<basket_builder_offer.Preference, basket_builder.Filter>","required":["algorithm","partition","strategy"],"properties":{"algorithm":{"oneOf":[{"description":"offers are scored using a weighted sum of their scores against each criterion, and the\noffer with the best score is selected.","type":"object","title":"weighted<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder_offer.WeightedCriterion<basket_builder_offer.Preference>","required":["criterion","weight"],"properties":{"criterion":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]},"weight":{"$ref":"#/components/schemas/std.string.String"}}}},"type":{"const":"weighted"}}},{"description":"offers are compared against each other using each criterion in priority order, and the\noffer that wins the most important criterion is selected. if there is a tie, the\nnext criterion is used as a tiebreaker, and so on.","type":"object","title":"lexicographic<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]}},"type":{"const":"lexicographic"}}}]},"partition":{"$ref":"#/components/schemas/basket_builder.Partition"},"strategy":{"oneOf":[{"description":"each step is inclusive of the offers from the previous steps.","type":"object","title":"cascade<basket_builder.Filter>","required":["steps","type"],"properties":{"steps":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Step<basket_builder.Filter>","properties":{"filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/basket_builder.Filter"}]}}}},"type":{"const":"cascade"}}}]}}}},"type":{"const":"waterfall"}}}]}}]}}},"offer_recommendation.RepairerRecommendations":{"type":"object","title":"offer_recommendation.RepairerRecommendations","required":["baskets","job_readiness","job_sensitivity","matches","offer_requests","offers","snapshot_hash","suppliers"],"properties":{"baskets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Basket"}},"job_readiness":{"$ref":"#/components/schemas/offers_search.JobReadiness"},"job_sensitivity":{"$ref":"#/components/schemas/offers_search.JobSensitivity"},"matches":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.JobPartMatch"}},"offer_requests":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.OfferRequestRecommendation"}},"offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Offer"}},"ranking":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Ranking"}]},"snapshot_hash":{"$ref":"#/components/schemas/std.string.String"},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.Supplier"}}}},"offer_recommendation.RepairerSearchRequestV1":{"type":"object","title":"offer_recommendation.RepairerSearchRequestV1","required":["fetch","job_id","recommend"],"properties":{"fetch":{"$ref":"#/components/schemas/offer_recommendation.FetchRequestV1"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"recommend":{"$ref":"#/components/schemas/offer_recommendation.RepairerRecommendRequestV1"}}},"offer_recommendation.SkipReason":{"oneOf":[{"const":"no_coverage"},{"const":"known_stock_in_basket"},{"const":"no_group_matched"}]},"offer_recommendation.StockPresence":{"oneOf":[{"const":"in_stock"},{"const":"no_stock"}]},"offer_recommendation.Sufficiency":{"oneOf":[{"const":"sufficient"},{"const":"thin"}]},"offer_recommendation.Supplier":{"type":"object","title":"offer_recommendation.Supplier","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"offer_recommendation.SupplierRecommendRequestV1":{"type":"object","title":"offer_recommendation.SupplierRecommendRequestV1","required":["pipeline"],"properties":{"pipeline":{"oneOf":[{"description":"the array of stages acts as an priority ordered list. evaluation is stopped after the first\nsuccessful stage","type":"object","title":"waterfall<basket_builder_offer.Preference, basket_builder.Filter>","required":["rank","stages","type"],"properties":{"rank":{"$ref":"#/components/schemas/basket_builder.Rank"},"stages":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Stage<basket_builder_offer.Preference, basket_builder.Filter>","required":["algorithm","partition","strategy"],"properties":{"algorithm":{"oneOf":[{"description":"offers are scored using a weighted sum of their scores against each criterion, and the\noffer with the best score is selected.","type":"object","title":"weighted<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder_offer.WeightedCriterion<basket_builder_offer.Preference>","required":["criterion","weight"],"properties":{"criterion":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]},"weight":{"$ref":"#/components/schemas/std.string.String"}}}},"type":{"const":"weighted"}}},{"description":"offers are compared against each other using each criterion in priority order, and the\noffer that wins the most important criterion is selected. if there is a tie, the\nnext criterion is used as a tiebreaker, and so on.","type":"object","title":"lexicographic<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]}},"type":{"const":"lexicographic"}}}]},"partition":{"$ref":"#/components/schemas/basket_builder.Partition"},"strategy":{"oneOf":[{"description":"each step is inclusive of the offers from the previous steps.","type":"object","title":"cascade<basket_builder.Filter>","required":["steps","type"],"properties":{"steps":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Step<basket_builder.Filter>","properties":{"filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/basket_builder.Filter"}]}}}},"type":{"const":"cascade"}}}]}}}},"type":{"const":"waterfall"}}}]}}},"offer_recommendation.SupplierRecommendations":{"type":"object","title":"offer_recommendation.SupplierRecommendations","required":["basket","matches","offers"],"properties":{"basket":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Recommendation"}},"matches":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.JobPartMatch"}},"offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Offer"}}}},"offer_recommendation.SupplierRef":{"type":"object","title":"offer_recommendation.SupplierRef","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_recommendation.SupplierScope":{"oneOf":[{"const":"supplier"},{"const":"supplier_buyer"},{"const":"supplier_make"}]},"offer_recommendation.SupplierSearchPartV1":{"type":"object","title":"offer_recommendation.SupplierSearchPartV1","required":["description","id","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Identity"}]},"quantity":{"$ref":"#/components/schemas/u8"},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offer_recommendation.SupplierSearchRequestV1":{"type":"object","title":"offer_recommendation.SupplierSearchRequestV1","required":["fetch","job_id","parts","recommend"],"properties":{"fetch":{"$ref":"#/components/schemas/offer_recommendation.FetchRequestV1"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.SupplierSearchPartV1"}},"recommend":{"$ref":"#/components/schemas/offer_recommendation.SupplierRecommendRequestV1"}}},"offer_recommendation.SupplyType":{"oneOf":[{"const":"oem_authorized"},{"const":"oem"},{"const":"used"},{"const":"aftermarket"}]},"offer_recommendation.Truth":{"oneOf":[{"const":"true"},{"const":"false"},{"const":"unknown"}]},"offer_recommendation.Verdict":{"oneOf":[{"type":"object","title":"bayesian_v1","required":["job","schema","suppliers"],"properties":{"job":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.Job"},"schema":{"const":"bayesian_v1"},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.ScoredSupplier"}}}},{"type":"object","title":"discovery_v1","required":["job","schema","suppliers"],"properties":{"job":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.Job"},"schema":{"const":"discovery_v1"},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.AllocatedSupplier"}}}}]},"offer_recommendation.Zone":{"oneOf":[{"type":"object","title":"nz","required":["market","region"],"properties":{"market":{"const":"nz"},"region":{"$ref":"#/components/schemas/offer_recommendation.NzRegion"}}}]},"offer_recommendation.bayesian_v1.Allocation":{"oneOf":[{"type":"object","title":"grouped","required":["atoms","group","kind","position"],"properties":{"atoms":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.FilterAtomOutcome"}},"group":{"$ref":"#/components/schemas/u32"},"kind":{"const":"grouped"},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"position":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"ungrouped","required":["kind"],"properties":{"kind":{"const":"ungrouped"}}},{"type":"object","title":"not_attempted","required":["kind"],"properties":{"kind":{"const":"not_attempted"}}}]},"offer_recommendation.bayesian_v1.Factor":{"oneOf":[{"type":"object","title":"track_record_rate","required":["denominator","kind","numerator"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"kind":{"const":"track_record_rate"},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}}}},{"type":"object","title":"track_record_duration","required":["kind","measure","statistic"],"properties":{"kind":{"const":"track_record_duration"},"measure":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"},"statistic":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.Statistic"}}},{"type":"object","title":"preferred_rank","required":["kind"],"properties":{"kind":{"const":"preferred_rank"}}},{"type":"object","title":"distance","required":["kind"],"properties":{"kind":{"const":"distance"}}},{"type":"object","title":"yard_vehicle","required":["kind"],"properties":{"kind":{"const":"yard_vehicle"}}}]},"offer_recommendation.bayesian_v1.Job":{"type":"object","title":"offer_recommendation.bayesian_v1.Job","required":["groups","total_weight"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.GroupActivation"}},"total_weight":{"$ref":"#/components/schemas/std.string.String"}}},"offer_recommendation.bayesian_v1.Observation":{"oneOf":[{"type":"object","title":"rate","required":["kind","prior","provenance","smoothed","successes","trials"],"properties":{"kind":{"const":"rate"},"prior":{"$ref":"#/components/schemas/std.string.String"},"provenance":{"$ref":"#/components/schemas/offer_recommendation.Provenance"},"smoothed":{"$ref":"#/components/schemas/std.string.String"},"successes":{"$ref":"#/components/schemas/u64"},"trials":{"$ref":"#/components/schemas/u64"}}},{"type":"object","title":"duration","required":["kind","provenance","seconds"],"properties":{"kind":{"const":"duration"},"provenance":{"$ref":"#/components/schemas/offer_recommendation.Provenance"},"seconds":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}},{"type":"object","title":"preferred_rank","required":["kind","rank"],"properties":{"kind":{"const":"preferred_rank"},"rank":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"distance","required":["kilometres","kind"],"properties":{"kilometres":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"kind":{"const":"distance"}}},{"type":"object","title":"yard_vehicle","required":["count","kind"],"properties":{"count":{"$ref":"#/components/schemas/u32"},"kind":{"const":"yard_vehicle"}}}]},"offer_recommendation.bayesian_v1.PartFactor":{"oneOf":[{"type":"object","title":"coverage","required":["kind"],"properties":{"kind":{"const":"coverage"}}},{"type":"object","title":"track_record_rate","required":["denominator","kind","numerator"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"kind":{"const":"track_record_rate"},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}}}}]},"offer_recommendation.bayesian_v1.PartObservation":{"oneOf":[{"type":"object","title":"coverage","required":["kind","sufficient","total","unknown_stock"],"properties":{"kind":{"const":"coverage"},"sufficient":{"$ref":"#/components/schemas/u32"},"total":{"$ref":"#/components/schemas/u32"},"unknown_stock":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"track_record_rate","required":["aggregate","kind","parts"],"properties":{"aggregate":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"track_record_rate"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.PartSource"}}}}]},"offer_recommendation.bayesian_v1.PartReason":{"type":"object","title":"offer_recommendation.bayesian_v1.PartReason","required":["factor","normalised","observed","weight"],"properties":{"factor":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.PartFactor"},"normalised":{"$ref":"#/components/schemas/std.string.String"},"observed":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.PartObservation"},"weight":{"$ref":"#/components/schemas/std.string.String"}}},"offer_recommendation.bayesian_v1.PartSource":{"type":"object","title":"offer_recommendation.bayesian_v1.PartSource","required":["hca","provenance","smoothed","successes","trials"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"provenance":{"$ref":"#/components/schemas/offer_recommendation.Provenance"},"smoothed":{"$ref":"#/components/schemas/std.string.String"},"successes":{"$ref":"#/components/schemas/u64"},"trials":{"$ref":"#/components/schemas/u64"}}},"offer_recommendation.bayesian_v1.Reason":{"type":"object","title":"offer_recommendation.bayesian_v1.Reason","required":["factor","normalised","observed","weight"],"properties":{"factor":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.Factor"},"normalised":{"$ref":"#/components/schemas/std.string.String"},"observed":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.Observation"},"weight":{"$ref":"#/components/schemas/std.string.String"}}},"offer_recommendation.bayesian_v1.ScoredSupplier":{"type":"object","title":"offer_recommendation.bayesian_v1.ScoredSupplier","required":["allocation","composite","disposition","part_reasons","rank","reasons","supplier"],"properties":{"allocation":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.Allocation"},"composite":{"$ref":"#/components/schemas/std.string.String"},"disposition":{"$ref":"#/components/schemas/offer_recommendation.Disposition"},"part_reasons":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.PartReason"}},"rank":{"$ref":"#/components/schemas/u32"},"reasons":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.bayesian_v1.Reason"}},"supplier":{"$ref":"#/components/schemas/offer_recommendation.SupplierRef"}}},"offer_recommendation.bayesian_v1.Statistic":{"oneOf":[{"const":"p50"},{"const":"p90"},{"const":"mean"}]},"offer_recommendation.discovery_v1.AllocatedSupplier":{"type":"object","title":"offer_recommendation.discovery_v1.AllocatedSupplier","required":["disposition","groups","supplier"],"properties":{"disposition":{"$ref":"#/components/schemas/offer_recommendation.Disposition"},"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.GroupOutcome"}},"supplier":{"$ref":"#/components/schemas/offer_recommendation.SupplierRef"}}},"offer_recommendation.discovery_v1.Allocation":{"type":"object","title":"offer_recommendation.discovery_v1.Allocation","required":["decided_by","position","sort"],"properties":{"decided_by":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.DecidedBy"},"enforcement":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.Enforcement"}]},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"position":{"$ref":"#/components/schemas/u32"},"sort":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.SortValue"}}}},"offer_recommendation.discovery_v1.DecidedBy":{"oneOf":[{"const":"keys"},{"const":"supplier_identity"}]},"offer_recommendation.discovery_v1.Enforcement":{"oneOf":[{"const":"mandatory"}]},"offer_recommendation.discovery_v1.GroupOutcome":{"oneOf":[{"type":"object","title":"inactive","required":["group","outcome"],"properties":{"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"inactive"}}},{"type":"object","title":"claimed","required":["by","group","outcome"],"properties":{"by":{"$ref":"#/components/schemas/u32"},"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"claimed"}}},{"type":"object","title":"not_matched","required":["atoms","group","outcome"],"properties":{"atoms":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.FilterAtomOutcome"}},"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"not_matched"}}},{"type":"object","title":"matched","required":["atoms","group","outcome","placement"],"properties":{"atoms":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.FilterAtomOutcome"}},"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"matched"},"placement":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.Placement"}}}]},"offer_recommendation.discovery_v1.Job":{"type":"object","title":"offer_recommendation.discovery_v1.Job","required":["groups"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.GroupActivation"}}}},"offer_recommendation.discovery_v1.Placement":{"oneOf":[{"type":"object","title":"offer_recommendation.discovery_v1.Allocation","required":["decided_by","kind","position","sort"],"properties":{"decided_by":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.DecidedBy"},"enforcement":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.Enforcement"}]},"kind":{"const":"allocated"},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"position":{"$ref":"#/components/schemas/u32"},"sort":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.SortValue"}}}},{"type":"object","title":"withheld","required":["kind"],"properties":{"kind":{"const":"withheld"}}}]},"offer_recommendation.discovery_v1.SortObservation":{"oneOf":[{"type":"object","title":"distance","required":["field","kilometres"],"properties":{"field":{"const":"distance"},"kilometres":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"preferred_rank","required":["field","observed"],"properties":{"field":{"const":"preferred_rank"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"stock_matches","required":["field","observed"],"properties":{"field":{"const":"stock_matches"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"yard_vehicle_count","required":["field","observed"],"properties":{"field":{"const":"yard_vehicle_count"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"zone_affinity","required":["field","repairer","supplier"],"properties":{"field":{"const":"zone_affinity"},"repairer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Zone"}]},"supplier":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.Zone"}}}},{"type":"object","title":"metrics_rate","required":["field","observed"],"properties":{"field":{"const":"metrics_rate"},"observed":{"type":"object","title":"offer_recommendation.Metric<rust_decimal.Decimal>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/offer_recommendation.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"metrics_duration","required":["field","observed"],"properties":{"field":{"const":"metrics_duration"},"observed":{"type":"object","title":"offer_recommendation.Metric<i64>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/offer_recommendation.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}}}}]},"offer_recommendation.discovery_v1.SortValue":{"type":"object","title":"offer_recommendation.discovery_v1.SortValue","required":["key","observed"],"properties":{"key":{"$ref":"#/components/schemas/u32"},"observed":{"$ref":"#/components/schemas/offer_recommendation.discovery_v1.SortObservation"}}},"offer_request.DiagramHotSpot":{"type":"object","title":"offer_request.DiagramHotSpot","required":["x1_px","x2_px","y1_px","y2_px"],"properties":{"x1_px":{"$ref":"#/components/schemas/i64"},"x2_px":{"$ref":"#/components/schemas/i64"},"y1_px":{"$ref":"#/components/schemas/i64"},"y2_px":{"$ref":"#/components/schemas/i64"}}},"offer_request.DiagramPolygonVector":{"type":"object","title":"offer_request.DiagramPolygonVector","required":["x","y"],"properties":{"x":{"$ref":"#/components/schemas/i64"},"y":{"$ref":"#/components/schemas/i64"}}},"offer_request.Error":{"oneOf":[{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"bad_request","required":["bad_request"],"properties":{"bad_request":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"unprocessable","required":["unprocessable"],"properties":{"unprocessable":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"email_integration","required":["email_integration"],"properties":{"email_integration":{"$ref":"#/components/schemas/InternalError"}}},{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}}]},"offer_request.Image":{"type":"object","title":"offer_request.Image","required":["original"],"properties":{"original":{"$ref":"#/components/schemas/std.string.String"}}},"offer_request.OffNetworkEmailPreviewRequest":{"type":"object","title":"offer_request.OffNetworkEmailPreviewRequest","required":["job_id","repairer_site_id","supplier_business_id"],"properties":{"job_id":{"description":"The job ID (used to resolve vehicle, parts, and email routing rules).","$ref":"#/components/schemas/uuid.Uuid"},"note":{"description":"Optional note from the repairer to include in the email preview.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_identities":{"description":"Optional subset of part IDs to include; if not provided, all estimated parts are used.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"repairer_site_id":{"description":"The repairer site making the request.","$ref":"#/components/schemas/uuid.Uuid"},"supplier_business_id":{"description":"The off-network supplier's business (store) ID.","$ref":"#/components/schemas/uuid.Uuid"}}},"offer_request.OffNetworkEmailPreviewResponse":{"type":"object","title":"offer_request.OffNetworkEmailPreviewResponse","required":["body","emails","subject"],"properties":{"body":{"$ref":"#/components/schemas/std.string.String"},"emails":{"description":"The resolved email addresses the off-network order email would be sent to.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"subject":{"$ref":"#/components/schemas/std.string.String"}}},"offer_request.OfferRequest":{"type":"object","title":"offer_request.OfferRequest","required":["created_at","events","id","job_id","store_id","users"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"events":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestEvent"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"},"users":{"description":"the users that are assigned to the offer request from the callee's organization","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestUser"}}}},"offer_request.OfferRequestEvent":{"type":"object","title":"offer_request.OfferRequestEvent","required":["created_at","id","kind","subject_v2"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/offer_request.OfferRequestEventKind"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"subject_v2":{"$ref":"#/components/schemas/offer_request.SubjectV2"}}},"offer_request.OfferRequestEventKind":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/offer_request.output.OfferRequestEventRepairerData"},{"type":"object","title":"offer_request.OfferRequestEventRepairer","required":["repairer_business_id","repairer_org_id","repairer_site"],"properties":{"repairer_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"repairer_org_id":{"description":"As a supplier, I can see repairer context (organisation & site & address) for the offer request,\nso I can ensure pricing and shipping is correct.","$ref":"#/components/schemas/uuid.Uuid"},"repairer_site":{"$ref":"#/components/schemas/offer_request.RepairerSite"}}},{"description":"tag object","type":"object","title":"tag","required":["type"],"properties":{"type":{"const":"repairer"}}}]},{"oneOf":[{"type":"object","title":"v1","required":["parts","status","type","version"],"properties":{"part_change_reasons":{"description":"Supplier provided reason for changing or removing a repairer part, per part identity","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestSupplierPart"}},"reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"$ref":"#/components/schemas/offer_request.OfferRequestStatus"},"type":{"const":"supplier"},"version":{"const":"v1"}}}]}]},"offer_request.OfferRequestEventRepairer":{"allOf":[{"$ref":"#/components/schemas/offer_request.output.OfferRequestEventRepairerData"},{"type":"object","title":"offer_request.OfferRequestEventRepairer","required":["repairer_business_id","repairer_org_id","repairer_site"],"properties":{"repairer_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"repairer_org_id":{"description":"As a supplier, I can see repairer context (organisation & site & address) for the offer request,\nso I can ensure pricing and shipping is correct.","$ref":"#/components/schemas/uuid.Uuid"},"repairer_site":{"$ref":"#/components/schemas/offer_request.RepairerSite"}}}]},"offer_request.OfferRequestEventSupplier":{"oneOf":[{"type":"object","title":"v1","required":["parts","status","version"],"properties":{"part_change_reasons":{"description":"Supplier provided reason for changing or removing a repairer part, per part identity","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestSupplierPart"}},"reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"$ref":"#/components/schemas/offer_request.OfferRequestStatus"},"version":{"const":"v1"}}}]},"offer_request.OfferRequestEventType":{"oneOf":[{"const":"repairer"},{"const":"supplier"}]},"offer_request.OfferRequestPartIdentity":{"type":"object","title":"offer_request.OfferRequestPartIdentity","required":["description","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u8"}}},"offer_request.OfferRequestPartOfferKind":{"oneOf":[{"type":"object","title":"offer_request.OfferRequestPartSellable","required":["id","price","type"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"price":{"$ref":"#/components/schemas/std.string.String"},"shipping_days_eta":{"description":"business days","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"shipping_hours_eta":{"description":"hours from midnight in supplier's local time","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]},"shipping_time":{"description":"deprecated - prefer relative shipping eta","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"store_address_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"type":{"const":"sellable"}}}]},"offer_request.OfferRequestPartSellable":{"type":"object","title":"offer_request.OfferRequestPartSellable","required":["id","price"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"price":{"$ref":"#/components/schemas/std.string.String"},"shipping_days_eta":{"description":"business days","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"shipping_hours_eta":{"description":"hours from midnight in supplier's local time","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]},"shipping_time":{"description":"deprecated - prefer relative shipping eta","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"store_address_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"offer_request.OfferRequestRationale":{"allOf":[{"$ref":"#/components/schemas/offer_request.OfferRequestRecommendationRationaleKind"},{"type":"object","title":"offer_request.OfferRequestRationale","properties":{}}]},"offer_request.OfferRequestRecommendationRationaleKind":{"oneOf":[{"type":"object","title":"matched_job_parts","required":["type"],"properties":{"type":{"const":"matched_job_parts"}}},{"type":"object","title":"donor_yard_vehicle_match","required":["type"],"properties":{"type":{"const":"donor_yard_vehicle_match"}}},{"type":"object","title":"preferred_supplier","required":["type"],"properties":{"type":{"const":"preferred_supplier"}}}]},"offer_request.OfferRequestRepairerOrderCreation":{"oneOf":[{"type":"object","title":"allowed","required":["type"],"properties":{"type":{"const":"allowed"}}}]},"offer_request.OfferRequestRepairerOrderEditing":{"oneOf":[{"type":"object","title":"allowed","required":["type"],"properties":{"type":{"const":"allowed"}}}]},"offer_request.OfferRequestRepairerPart":{"allOf":[{"$ref":"#/components/schemas/offer_request.OfferRequestPartIdentity"},{"type":"object","title":"offer_request.OfferRequestRepairerPart","required":["id"],"properties":{"assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.PartAssemblyMetadata"}]},"hcas":{"description":"HCA breadcrumb for the part.\n[deprecated] - prefer identity.description or identity.ghca_id","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"id":{"description":"The unique id for the job part.","$ref":"#/components/schemas/uuid.Uuid"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"offers":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestPartOfferKind"}}]},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"offer_request.OfferRequestRepairerPartReturnCondition":{"oneOf":[{"const":"not_damaged"}]},"offer_request.OfferRequestRepairerPartReturnPolicy":{"oneOf":[{"const":"no_returns"},{"type":"object","title":"allow_returns","required":["allow_returns"],"properties":{"allow_returns":{"type":"object","title":"allow_returns","properties":{"before_date":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestRepairerPartReturnCondition"}]}}}}}]},"offer_request.OfferRequestStatus":{"oneOf":[{"const":"pending"},{"const":"accepted"},{"const":"rejected"},{"const":"closed"}]},"offer_request.OfferRequestSupplierPart":{"allOf":[{"$ref":"#/components/schemas/offer_request.OfferRequestPartIdentity"},{"type":"object","title":"offer_request.OfferRequestSupplierPart","required":["id"],"properties":{"data":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestSupplierPartData"}]},"id":{"description":"As a supplier, I want to be able to select a parent assembly part for any offer request part,\nso I can have more flexibility.\n\nNote: the consumer of the API will need to deduplicate on ids in case an\nassembly offer is used for multiple parts.\n\nThe unique id for the job part.","$ref":"#/components/schemas/uuid.Uuid"}}}]},"offer_request.OfferRequestSupplierPartData":{"allOf":[{"$ref":"#/components/schemas/offer_request.OfferRequestPartOfferKind"},{"type":"object","title":"offer_request.OfferRequestSupplierPartData","properties":{"group_id":{"description":"used to differentiate between \"grouped\" / \"assembly\" parts and \"individual\" parts.\npurerly for fe display purposes.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestRepairerPartReturnPolicy"}]}}}]},"offer_request.OfferRequestUser":{"type":"object","title":"offer_request.OfferRequestUser","required":["created_at","user"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"user":{"$ref":"#/components/schemas/offer_request.User"}}},"offer_request.PartAssemblyMetadata":{"type":"object","title":"offer_request.PartAssemblyMetadata","required":["id"],"properties":{"diagram_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_hotspot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.DiagramHotSpot"}]},"diagram_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_pnc":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_segments":{"deprecated":true,"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.DiagramPolygonVector"}}},"diagram_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hcas":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"id":{"$ref":"#/components/schemas/std.string.String"}}},"offer_request.PartIdentity":{"type":"object","title":"offer_request.PartIdentity","required":["brand_id","mpn"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"offer_request.RepairerSite":{"type":"object","title":"offer_request.RepairerSite","required":["id","name","shipping_address"],"properties":{"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"shipping_address":{"$ref":"#/components/schemas/Address"}}},"offer_request.RequestsCloseRequestData":{"type":"object","title":"offer_request.RequestsCloseRequestData","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/offer_request.RequestsCloseStatus"}}},"offer_request.RequestsCloseResponse":{"type":"object","title":"offer_request.RequestsCloseResponse","properties":{}},"offer_request.RequestsCloseStatus":{"oneOf":[{"type":"object","title":"order_placed","required":["type"],"properties":{"type":{"const":"order_placed"}}}]},"offer_request.RequestsEventsInsert":{"type":"object","title":"offer_request.RequestsEventsInsert","required":["request_identity"],"properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_creation":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestRepairerOrderCreation"}]},"order_editing":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestRepairerOrderEditing"}]},"part_identities":{"description":"optional subset of parts that belong to the job; if not provided, all\nestimated parts will be sent","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"part_identity_offers":{"description":"part identity offers mapped by part identity; these override the basket\nrecommendations for the parts they are provided for","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestPartOfferKind"}}}]},"rationale":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestRationale"}},"request_identity":{"$ref":"#/components/schemas/uuid.Uuid"},"snapshot_hash":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offer_request.RequestsEventsInsertRequestData":{"type":"object","title":"offer_request.RequestsEventsInsertRequestData","required":["request_events"],"properties":{"request_events":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.RequestsEventsInsert"}}}},"offer_request.RequestsEventsInsertResponse":{"type":"object","title":"offer_request.RequestsEventsInsertResponse","properties":{"event_identities":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"offer_request.RequestsInsertRequestData":{"type":"object","title":"offer_request.RequestsInsertRequestData","required":["suppliers"],"properties":{"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.RequestsInsertSupplier"}}}},"offer_request.RequestsInsertResponse":{"type":"object","title":"offer_request.RequestsInsertResponse","properties":{"request_identities":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"offer_request.RequestsInsertSupplier":{"type":"object","title":"offer_request.RequestsInsertSupplier","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_request.RequestsListRequestData":{"type":"object","title":"offer_request.RequestsListRequestData","properties":{}},"offer_request.RequestsListResponse":{"type":"object","title":"offer_request.RequestsListResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequest"}}}},"offer_request.SearchRequest":{"type":"object","title":"offer_request.SearchRequest","properties":{"event_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestEventType"}]},"job_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"keyword":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"page":{"$ref":"#/components/schemas/PageRequest"}}},"offer_request.SearchResponse":{"type":"object","title":"offer_request.SearchResponse","required":["page"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequest"}},"page":{"$ref":"#/components/schemas/ForwardPagination"}}},"offer_request.SubjectV2":{"oneOf":[{"type":"object","title":"user","required":["id","type"],"properties":{"data":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.User"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"user"}}},{"type":"object","title":"system","required":["type"],"properties":{"type":{"const":"system"}}}]},"offer_request.SupplierEventInsertData":{"type":"object","title":"offer_request.SupplierEventInsertData","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/offer_request.OfferRequestEventSupplier"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offer_request.User":{"type":"object","title":"offer_request.User","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"mobile_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"}}},"offer_request.UsersInsertRequestData":{"type":"object","title":"offer_request.UsersInsertRequestData","required":["user_ids"],"properties":{"user_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"offer_request.UsersRemoveRequestData":{"type":"object","title":"offer_request.UsersRemoveRequestData","required":["user_ids"],"properties":{"user_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"offer_request.output.OfferRequestEventRepairerData":{"oneOf":[{"type":"object","title":"v1","required":["parts","vehicle","version"],"properties":{"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.Image"}},"job_number":{"description":"As an estimator, I want to include job number into offer reply email","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"near_total_loss":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"order_creation":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestRepairerOrderCreation"}]},"order_editing":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.OfferRequestRepairerOrderEditing"}]},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestRepairerPart"}},"rationale":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_request.OfferRequestRationale"}},"snapshot_hash":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle":{"description":"As a repairer, I want to include job context (vehicle info, photos, crash zones, jobs parts list)\nwith and offer request to a supplier, so that the supplier can be more accurate in their offer response.","$ref":"#/components/schemas/offer_request.output.Vehicle"},"version":{"const":"v1"},"work_provider_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"offer_request.output.Vehicle":{"type":"object","title":"offer_request.output.Vehicle","required":["chassis_number","oem_brand","plate_number","plate_state","variant"],"properties":{"chassis_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oem_brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_state":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"variant":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.output.VehicleVariant"}]}}},"offer_request.output.VehicleVariant":{"type":"object","title":"offer_request.output.VehicleVariant","required":["description","token","uvdb_properties"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"token":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"uvdb_properties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"offer_rules.AgeCells":{"type":"object","title":"offer_rules.AgeCells","required":["gte","lt"],"properties":{"gte":{"description":"`vehicle.age_months >= threshold`. True = Yes (allowed), False = No (disallow).","$ref":"#/components/schemas/bool"},"lt":{"description":"`vehicle.age_months < threshold`. True = Yes (allowed), False = No (disallow).","$ref":"#/components/schemas/bool"}}},"offer_rules.AllowedSupplier":{"description":"A supplier in a `SupplierEnforcement::AllowOnly` list. The `id` is the\nload-bearing identity used in generated rule preconditions; `name` is the\nhuman-facing label baked into the rule's `reason` string so editor /\ndebugging output reads as business names instead of UUIDs.","type":"object","title":"offer_rules.AllowedSupplier","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"offer_rules.CategoryRow":{"type":"object","title":"offer_rules.CategoryRow","required":["independently_certified","non_oe","oes","recycled_oem"],"properties":{"independently_certified":{"$ref":"#/components/schemas/offer_rules.AgeCells"},"non_oe":{"$ref":"#/components/schemas/offer_rules.AgeCells"},"oes":{"$ref":"#/components/schemas/offer_rules.AgeCells"},"recycled_oem":{"$ref":"#/components/schemas/offer_rules.AgeCells"}}},"offer_rules.ConfigRelationship":{"oneOf":[{"const":"authored"},{"const":"applies_to_me"}]},"offer_rules.InsurerCategory":{"description":"API-facing shape for a single insurer category (with its HCAs).","type":"object","title":"offer_rules.InsurerCategory","required":["description","display_order","hca_ids","id","name"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_order":{"$ref":"#/components/schemas/i32"},"hca_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"id":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"offer_rules.InsurerCategorySummary":{"description":"Same shape as [`InsurerCategory`] minus the HCA list. Returned by\n`categories.list` to keep the payload bounded — the full HCA list\n(~7k rows across all categories) ships via `categories.get`.","type":"object","title":"offer_rules.InsurerCategorySummary","required":["description","display_order","id","name"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_order":{"$ref":"#/components/schemas/i32"},"id":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"offer_rules.Matrix":{"type":"object","title":"offer_rules.Matrix","required":["categories","vehicle_age_thresholds"],"properties":{"categories":{"description":"Per-category × supply-type × age-bucket Yes/No matrix.\nKeys at the outer map: `insurer_categories.id`.","type":"object","additionalProperties":{"$ref":"#/components/schemas/offer_rules.CategoryRow"}},"vehicle_age_thresholds":{"description":"Age threshold per supply type, in months, compared against\n`vehicle.age_months` by the generated rule preconditions. `None` = no\nthreshold needed for this column (either both age cells agree or\nthey're both Yes).","$ref":"#/components/schemas/offer_rules.SupplyTypeThresholds"}}},"offer_rules.SupplierEnforcement":{"oneOf":[{"description":"Only the listed suppliers may supply parts in this category. Non-listed\nsuppliers may supply only `genuine` parts for this category — anything\nnon-genuine from a non-listed supplier is disallowed.","type":"object","title":"allow_only","required":["suppliers","type"],"properties":{"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_rules.AllowedSupplier"}},"type":{"const":"allow_only"}}}]},"offer_rules.SupplyType":{"oneOf":[{"const":"oes"},{"const":"independently_certified"},{"const":"non_oe"},{"const":"recycled_oem"}]},"offer_rules.SupplyTypeThresholds":{"type":"object","title":"offer_rules.SupplyTypeThresholds","required":["independently_certified","non_oe","oes","recycled_oem"],"properties":{"independently_certified":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"non_oe":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"recycled_oem":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"offer_rules.WorkProviderOfferRuleConfig":{"description":"API-facing shape for a single config version.","type":"object","title":"offer_rules.WorkProviderOfferRuleConfig","required":["business_rule_id","created_at","created_by","form_data","id","version"],"properties":{"business_rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"$ref":"#/components/schemas/chrono.NaiveDateTime"},"created_by":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"form_data":{"$ref":"#/components/schemas/offer_rules.output.FormData"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"version":{"$ref":"#/components/schemas/i32"}}},"offer_rules.categories.GetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_rules.categories.GetRequest":{"type":"object","title":"offer_rules.categories.GetRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},"offer_rules.categories.GetResponse":{"type":"object","title":"offer_rules.categories.GetResponse","required":["category"],"properties":{"category":{"$ref":"#/components/schemas/offer_rules.InsurerCategory"}}},"offer_rules.categories.InsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"already_exists"},{"const":"unknown_hca"}]},"offer_rules.categories.InsertRequest":{"type":"object","title":"offer_rules.categories.InsertRequest","required":["id","name"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_order":{"$ref":"#/components/schemas/i32"},"hca_ids":{"description":"HCAs to assign to this category. Each will be removed from any previous category.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"id":{"description":"Stable slug, e.g. \"cooling\". Must match the keys form_data uses.","$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"offer_rules.categories.InsertResponse":{"type":"object","title":"offer_rules.categories.InsertResponse","required":["category"],"properties":{"category":{"$ref":"#/components/schemas/offer_rules.InsurerCategory"}}},"offer_rules.categories.ListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"offer_rules.categories.ListRequest":{"type":"object","title":"offer_rules.categories.ListRequest","properties":{}},"offer_rules.categories.ListResponse":{"type":"object","title":"offer_rules.categories.ListResponse","required":["categories"],"properties":{"categories":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_rules.InsurerCategorySummary"}}}},"offer_rules.categories.RemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_rules.categories.RemoveRequest":{"type":"object","title":"offer_rules.categories.RemoveRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}},"offer_rules.categories.RemoveResponse":{"type":"object","title":"offer_rules.categories.RemoveResponse","properties":{}},"offer_rules.categories.UpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"const":"unknown_hca"}]},"offer_rules.categories.UpdateRequest":{"description":"Non-nullable columns (`name`, `display_order`, `hca_ids`) use plain\n`std::option::Option<T>`: `None` (omit) leaves the column alone, `Some(v)`\nwrites. `description` is the one nullable column, so it uses\n`reflectapi::Option<String>` to differentiate \"leave alone\" (`Undefined`)\nfrom \"clear to NULL\" (`None`) and \"set value\" (`Some`).","type":"object","title":"offer_rules.categories.UpdateRequest","required":["id"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_order":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"hca_ids":{"description":"Full HCA list for this category. HCAs not in this list will be detached from this\ncategory; HCAs in this list but currently assigned to another category will be moved.\nOmit to leave the HCA list unchanged.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"id":{"$ref":"#/components/schemas/std.string.String"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offer_rules.categories.UpdateResponse":{"type":"object","title":"offer_rules.categories.UpdateResponse","required":["category"],"properties":{"category":{"$ref":"#/components/schemas/offer_rules.InsurerCategory"}}},"offer_rules.configs.GetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_rules.configs.GetRequest":{"type":"object","title":"offer_rules.configs.GetRequest","required":["business_rule_id"],"properties":{"business_rule_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_rules.configs.GetResponse":{"type":"object","title":"offer_rules.configs.GetResponse","required":["versions"],"properties":{"versions":{"description":"All stored versions, newest first.","type":"array","items":{"$ref":"#/components/schemas/offer_rules.WorkProviderOfferRuleConfig"}}}},"offer_rules.configs.InsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"rule_validation","required":["rule_validation"],"properties":{"rule_validation":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.RuleValidationError"}}}},{"type":"object","title":"rule_schema_validation","required":["rule_schema_validation"],"properties":{"rule_schema_validation":{"$ref":"#/components/schemas/business_rules.RuleSchemaValidationError"}}},{"const":"priority_negative"}]},"offer_rules.configs.InsertRequest":{"type":"object","title":"offer_rules.configs.InsertRequest","required":["form_data","name"],"properties":{"form_data":{"$ref":"#/components/schemas/offer_rules.input.FormData"},"name":{"description":"Human-readable contract / config name.","$ref":"#/components/schemas/std.string.String"},"priority":{"description":"Higher priority wins when multiple matching rules exist.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"targets":{"description":"Empty = applies to every target org. Repairer-authored overrides typically set this\nto `[{ organization_id: work_provider }]`.","type":"array","items":{"$ref":"#/components/schemas/business_rules.input.RuleTarget"}}}},"offer_rules.configs.InsertResponse":{"type":"object","title":"offer_rules.configs.InsertResponse","required":["business_rule_id","config"],"properties":{"business_rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"config":{"$ref":"#/components/schemas/offer_rules.WorkProviderOfferRuleConfig"}}},"offer_rules.configs.Item":{"type":"object","title":"offer_rules.configs.Item","required":["business_rule_id","form_data","name","organization_id","priority","relationship","targets"],"properties":{"business_rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"form_data":{"description":"Latest form_data for this rule. Rules without a config row (legacy\nrules predating this surface) are filtered out of the response, so\nevery `Item` carries form_data.","$ref":"#/components/schemas/offer_rules.output.FormData"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"priority":{"$ref":"#/components/schemas/i32"},"relationship":{"$ref":"#/components/schemas/offer_rules.ConfigRelationship"},"targets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.output.RuleTarget"}}}},"offer_rules.configs.ListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"offer_rules.configs.ListRequest":{"type":"object","title":"offer_rules.configs.ListRequest","properties":{}},"offer_rules.configs.ListResponse":{"type":"object","title":"offer_rules.configs.ListResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_rules.configs.Item"}}}},"offer_rules.configs.RemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_rules.configs.RemoveRequest":{"type":"object","title":"offer_rules.configs.RemoveRequest","required":["business_rule_id"],"properties":{"business_rule_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_rules.configs.RemoveResponse":{"type":"object","title":"offer_rules.configs.RemoveResponse","properties":{}},"offer_rules.configs.UpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"const":"wrong_rule_kind"},{"type":"object","title":"rule_validation","required":["rule_validation"],"properties":{"rule_validation":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.RuleValidationError"}}}},{"type":"object","title":"rule_schema_validation","required":["rule_schema_validation"],"properties":{"rule_schema_validation":{"$ref":"#/components/schemas/business_rules.RuleSchemaValidationError"}}}]},"offer_rules.configs.UpdateRequest":{"type":"object","title":"offer_rules.configs.UpdateRequest","required":["business_rule_id","form_data"],"properties":{"business_rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"form_data":{"$ref":"#/components/schemas/offer_rules.input.FormData"}}},"offer_rules.configs.UpdateResponse":{"type":"object","title":"offer_rules.configs.UpdateResponse","required":["config"],"properties":{"config":{"$ref":"#/components/schemas/offer_rules.WorkProviderOfferRuleConfig"}}},"offer_rules.evaluate.EvaluateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_items","required":["too_many_items"],"properties":{"too_many_items":{"type":"object","title":"too_many_items","required":["count","max"],"properties":{"count":{"$ref":"#/components/schemas/usize"},"max":{"$ref":"#/components/schemas/usize"}}}}}]},"offer_rules.evaluate.EvaluateRequest":{"type":"object","title":"offer_rules.evaluate.EvaluateRequest","required":["items","repairer_site_id","vehicle","work_provider_contract","work_provider_organization_id"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.PartInfo"}},"repairer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"vehicle":{"$ref":"#/components/schemas/business_rules.VehicleContext"},"work_provider_contract":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"offer_rules.evaluate.EvaluateResponse":{"type":"object","title":"offer_rules.evaluate.EvaluateResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.OfferRuleOutput"}}}},"offer_rules.input.FormData":{"description":"Lossless representation of the original CSV input the standalone generator\nconsumed, plus the supplier-enforcement extension.","type":"object","title":"offer_rules.input.FormData","required":["matrix","version"],"properties":{"manufacturer_exceptions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"matrix":{"$ref":"#/components/schemas/offer_rules.Matrix"},"supplier_enforcement":{"description":"Per-category supplier enforcement. Keyed by `insurer_categories.id`.","type":"object","additionalProperties":{"$ref":"#/components/schemas/offer_rules.SupplierEnforcement"}},"version":{"description":"Schema version of the form_data payload itself (allows future migration).","$ref":"#/components/schemas/u32"}}},"offer_rules.job_views.AllowanceOutcome":{"oneOf":[{"const":"allowed"},{"const":"disallowed"},{"const":"requires_vehicle_age","description":"The column's cells differ by vehicle age and the job has no registration date."},{"const":"requires_category","description":"The categories disagree on this column and the part's HCA maps to none."}]},"offer_rules.job_views.GetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_rules.job_views.GetManyError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_job_ids","required":["too_many_job_ids"],"properties":{"too_many_job_ids":{"type":"object","title":"too_many_job_ids","required":["count","max"],"properties":{"count":{"$ref":"#/components/schemas/usize"},"max":{"$ref":"#/components/schemas/usize"}}}}}]},"offer_rules.job_views.GetManyRequest":{"description":"**Beta — unstable.** This surface is expected to change; do not build\nexternal integrations against it yet.","type":"object","title":"offer_rules.job_views.GetManyRequest","required":["job_ids"],"properties":{"job_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"offer_rules.job_views.GetRequest":{"description":"**Beta — unstable.** This surface is expected to change; do not build\nexternal integrations against it yet.","type":"object","title":"offer_rules.job_views.GetRequest","required":["job_id"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offer_rules.job_views.GetResponse":{"description":"**Beta — unstable.** This surface is expected to change; do not build\nexternal integrations against it yet.","type":"object","title":"offer_rules.job_views.GetResponse","required":["manufacturer_exception","parts","rule"],"properties":{"manufacturer_exception":{"description":"The vehicle make the resolved rule excludes from every non-genuine supply\ntype, as its snake_case slug (e.g. `nissan`), when such an exception\napplies to this job; every column then reads `disallowed`. `None` when no\nexception applies or no rule resolved.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parts":{"description":"One entry per estimated part on the job.","type":"array","items":{"$ref":"#/components/schemas/offer_rules.job_views.PartView"}},"rule":{"$ref":"#/components/schemas/offer_rules.job_views.RuleResolution"}}},"offer_rules.job_views.JobRuleSummary":{"description":"**Beta — unstable.** This surface is expected to change; do not build\nexternal integrations against it yet.","type":"object","title":"offer_rules.job_views.JobRuleSummary","required":["job_id","mapped_part_count","rule","supply_types"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"mapped_part_count":{"description":"Estimated parts whose HCA maps to an insurer category, which is what the\ncolumns are folded over. Independent of `rule`: a job with no resolved rule\nstill reports the parts that map.","$ref":"#/components/schemas/u32"},"rule":{"$ref":"#/components/schemas/offer_rules.job_views.RuleResolution"},"supply_types":{"description":"One entry per matrix column, in the order the editor shows them, folded\nover the mapped parts. Genuine (OEM) is not a column and is always\nallowed. Empty unless `rule` is `resolved`.","type":"array","items":{"$ref":"#/components/schemas/offer_rules.job_views.SupplyTypeSummary"}}}},"offer_rules.job_views.PartView":{"type":"object","title":"offer_rules.job_views.PartView","required":["category","job_part_id","supply_types"],"properties":{"category":{"description":"`None` when the part has no HCA or its HCA sits outside every insurer category.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_rules.InsurerCategorySummary"}]},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supply_types":{"description":"One entry per matrix column. Genuine (OEM) is not a column and is always\nallowed. Empty unless `rule` is `resolved`.","type":"array","items":{"$ref":"#/components/schemas/offer_rules.job_views.SupplyTypeAllowance"}}}},"offer_rules.job_views.RuleResolution":{"oneOf":[{"type":"object","title":"resolved","required":["authored_by_organization_id","business_rule_id","name","type"],"properties":{"authored_by_organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"business_rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"resolved"}}},{"type":"object","title":"no_contract","required":["type"],"properties":{"type":{"const":"no_contract"}}},{"type":"object","title":"unknown_work_provider","required":["type"],"properties":{"type":{"const":"unknown_work_provider"}}}]},"offer_rules.job_views.SupplyTypeAllowance":{"type":"object","title":"offer_rules.job_views.SupplyTypeAllowance","required":["outcome","supply_type"],"properties":{"outcome":{"$ref":"#/components/schemas/offer_rules.job_views.AllowanceOutcome"},"supply_type":{"$ref":"#/components/schemas/offer_rules.SupplyType"}}},"offer_rules.job_views.SupplyTypeSummary":{"type":"object","title":"offer_rules.job_views.SupplyTypeSummary","required":["all_disallowed","any_allowed","supply_type"],"properties":{"all_disallowed":{"description":"Every mapped part outright disallows it. `requires_vehicle_age` and\n`requires_category` are neither an allowance nor a disallowance, so a\ncolumn waiting on either is false on both flags.","$ref":"#/components/schemas/bool"},"any_allowed":{"description":"At least one mapped part the rule outright allows this column for.","$ref":"#/components/schemas/bool"},"supply_type":{"$ref":"#/components/schemas/offer_rules.SupplyType"}}},"offer_rules.output.FormData":{"description":"Lossless representation of the original CSV input the standalone generator\nconsumed, plus the supplier-enforcement extension.","type":"object","title":"offer_rules.output.FormData","required":["manufacturer_exceptions","matrix","supplier_enforcement","version"],"properties":{"manufacturer_exceptions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"matrix":{"$ref":"#/components/schemas/offer_rules.Matrix"},"supplier_enforcement":{"description":"Per-category supplier enforcement. Keyed by `insurer_categories.id`.","type":"object","additionalProperties":{"$ref":"#/components/schemas/offer_rules.SupplierEnforcement"}},"version":{"description":"Schema version of the form_data payload itself (allows future migration).","$ref":"#/components/schemas/u32"}}},"offer_snapshot.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"offer_snapshot.GetRequest":{"type":"object","title":"offer_snapshot.GetRequest","required":["job_id"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"snapshot_hash":{"description":"legacy: if not provided, the latest snapshot will be returned","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offer_snapshot.Metadata":{"type":"object","title":"offer_snapshot.Metadata","required":["job_id","metadata"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/offer_snapshot.MetadataData"},"offer_request_summary":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_snapshot.OfferRequestSummary"}]}}},"offer_snapshot.MetadataBasket":{"allOf":[{"$ref":"#/components/schemas/offer_snapshot.MetadataBasketKind"},{"type":"object","title":"offer_snapshot.MetadataBasket","required":["fulfillment"],"properties":{"fulfillment":{"$ref":"#/components/schemas/offer_snapshot.MetadataBasketFulfillmentStatus"}}}]},"offer_snapshot.MetadataBasketFulfillmentStatus":{"oneOf":[{"type":"object","title":"fulfilled","required":["type"],"properties":{"type":{"const":"fulfilled"}}},{"type":"object","title":"not_fulfilled","required":["fulfilled_parts","type"],"properties":{"fulfilled_parts":{"$ref":"#/components/schemas/u32"},"type":{"const":"not_fulfilled"}}}]},"offer_snapshot.MetadataBasketKind":{"oneOf":[{"type":"object","title":"single","required":["type"],"properties":{"type":{"const":"single"}}},{"type":"object","title":"split","required":["type"],"properties":{"type":{"const":"split"}}}]},"offer_snapshot.MetadataData":{"oneOf":[{"type":"object","title":"v0","required":["job_readiness","provisional_ordering","version"],"properties":{"baskets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_snapshot.MetadataBasket"}},"job_readiness":{"$ref":"#/components/schemas/offer_snapshot.MetadataJobReadinessStatus"},"provisional_ordering":{"$ref":"#/components/schemas/offer_snapshot.MetadataProvisionalOrderingStatus"},"version":{"const":"v0"}}}]},"offer_snapshot.MetadataGetManyRequest":{"type":"object","title":"offer_snapshot.MetadataGetManyRequest","required":["job_ids"],"properties":{"job_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"offer_snapshot.MetadataJobReadinessStatus":{"oneOf":[{"type":"object","title":"ready","required":["type"],"properties":{"type":{"const":"ready"}}},{"type":"object","title":"not_ready","required":["type"],"properties":{"type":{"const":"not_ready"}}}]},"offer_snapshot.MetadataProvisionalOrderingStatus":{"oneOf":[{"type":"object","title":"available","required":["type"],"properties":{"type":{"const":"available"}}},{"type":"object","title":"not_available","required":["type"],"properties":{"type":{"const":"not_available"}}}]},"offer_snapshot.OfferRequestSummary":{"type":"object","title":"offer_snapshot.OfferRequestSummary","required":["responded","total"],"properties":{"rejected":{"description":"Subset of `responded` whose latest supplier event rejected the request\n(so accepted responses = `responded - rejected`). Optional: responses\nfrom an older server omit it, and consumers should treat absent as `0`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"responded":{"description":"Suppliers that have responded — any status, including rejections. Kept as\nthe total-responses count so existing consumers are unaffected.","$ref":"#/components/schemas/u32"},"total":{"$ref":"#/components/schemas/u32"}}},"offer_snapshot.Ref":{"oneOf":[{"type":"object","title":"id","required":["id","job_id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"id"}}},{"type":"object","title":"legacy_hash","required":["job_id","kind","legacy_hash"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"legacy_hash"},"legacy_hash":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"stored","required":["job_id","kind","value"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"stored"},"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"offer_snapshot.Run":{"type":"object","title":"offer_snapshot.Run","required":["created_at","id","job_id","legacy_hash","subject"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"legacy_hash":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"subject":{"$ref":"#/components/schemas/recommendation_log.Subject"}}},"offer_snapshot.Runs":{"oneOf":[{"type":"object","title":"latest","required":["job_ids","kind"],"properties":{"job_ids":{"description":"A value whose length (characters for strings, items for arrays) must be within MIN..=MAX (inclusive). Violating requests are rejected with HTTP 400.","type":"array","prefixItems":[{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"kind":{"const":"latest"}}},{"type":"object","title":"by_ref","required":["kind","refs"],"properties":{"kind":{"const":"by_ref"},"refs":{"description":"A value whose length (characters for strings, items for arrays) must be within MIN..=MAX (inclusive). Violating requests are rejected with HTTP 400.","type":"array","prefixItems":[{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_snapshot.Ref"}}]}}}]},"offer_snapshot.SearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"offer_snapshot.SearchFrame":{"oneOf":[{"type":"object","title":"run","required":["kind","run"],"properties":{"kind":{"const":"run"},"run":{"$ref":"#/components/schemas/offer_snapshot.Run"}}},{"type":"object","title":"request","required":["body","kind","run_id"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.request.Request"},"kind":{"const":"request"},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"stage","required":["body","kind","position","run_id","stage"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.stage.Settled"},"kind":{"const":"stage"},"position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"},"stage":{"$ref":"#/components/schemas/recommendation_log.stage.Stage"}}},{"type":"object","title":"part","required":["body","kind","part_key","position","run_id"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.part.Part"},"kind":{"const":"part"},"part_key":{"$ref":"#/components/schemas/std.string.String"},"position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"supplier","required":["body","business_id","kind","organization_id","position","run_id"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.supplier.Supplier"},"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"supplier"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"product","required":["body","business_id","kind","organization_id","position","run_id","sellable_id"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.product.Product"},"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"product"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"offer","required":["body","kind","offer_id","position","run_id"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.offer.Offer"},"kind":{"const":"offer"},"offer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"basket","required":["basket_key","body","kind","position","run_id"],"properties":{"basket_key":{"$ref":"#/components/schemas/std.string.String"},"body":{"$ref":"#/components/schemas/recommendation_log.basket.Baskets"},"kind":{"const":"basket"},"position":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"ranking","required":["body","kind","run_id"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.ranking.Ranking"},"kind":{"const":"ranking"},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"clearance","required":["body","kind","run_id"],"properties":{"body":{"$ref":"#/components/schemas/recommendation_log.clearance.Clearance"},"kind":{"const":"clearance"},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"run_end","required":["kind","run_id"],"properties":{"kind":{"const":"run_end"},"run_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"failed","required":["error","kind"],"properties":{"error":{"$ref":"#/components/schemas/offer_snapshot.SearchError"},"kind":{"const":"failed"}}},{"type":"object","title":"done","required":["kind"],"properties":{"kind":{"const":"done"}}}]},"offer_snapshot.SearchRequest":{"type":"object","title":"offer_snapshot.SearchRequest","required":["runs"],"properties":{"include":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_snapshot.Section"}},"runs":{"$ref":"#/components/schemas/offer_snapshot.Runs"}}},"offer_snapshot.Section":{"oneOf":[{"const":"request"},{"const":"stages"},{"const":"parts"},{"const":"suppliers"},{"const":"products"},{"const":"offers"},{"const":"baskets"},{"const":"ranking"},{"const":"clearance"}]},"offer_snapshot.SnapshotData":{"oneOf":[{"type":"object","title":"offer_snapshot.SnapshotV0","required":["recommendations","version"],"properties":{"available_offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Offer"}},"baskets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Basket"}},"deliver_before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"matches":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.JobPartMatch"}},"offer_request_recommendations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.OfferRequestRecommendation"}},"ranking":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Ranking"}]},"recommendations":{"$ref":"#/components/schemas/offers_search.Recommendations"},"requested_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.PartRequest"}},"user_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"version":{"const":"v0"}}}]},"offer_snapshot.SnapshotV0":{"type":"object","title":"offer_snapshot.SnapshotV0","required":["recommendations"],"properties":{"available_offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Offer"}},"baskets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Basket"}},"deliver_before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"matches":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.JobPartMatch"}},"offer_request_recommendations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.OfferRequestRecommendation"}},"ranking":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Ranking"}]},"recommendations":{"$ref":"#/components/schemas/offers_search.Recommendations"},"requested_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.PartRequest"}},"user_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"offers.Automation":{"oneOf":[{"const":"permitted"},{"const":"not_permitted"}]},"offers.Clearance":{"type":"object","title":"offers.Clearance","required":["sensitivity","status"],"properties":{"sensitivity":{"$ref":"#/components/schemas/offers.Sensitivity"},"status":{"$ref":"#/components/schemas/offers.Status"}}},"offers.Limits":{"type":"object","title":"offers.Limits","properties":{"timeout_ms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"offers.Outreach":{"type":"object","title":"offers.Outreach","required":["automation","rationale","score","supplier"],"properties":{"automation":{"$ref":"#/components/schemas/offers.Automation"},"rationale":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.Reason"}},"score":{"$ref":"#/components/schemas/std.string.String"},"supplier":{"$ref":"#/components/schemas/offers.business.Key"}}},"offers.Part":{"type":"object","title":"offers.Part","required":["description","id","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Identity"}]},"quantity":{"$ref":"#/components/schemas/u8"},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offers.Reason":{"oneOf":[{"type":"object","title":"matched_parts","required":["kind","parts"],"properties":{"kind":{"const":"matched_parts"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.part.Key"}}}},{"type":"object","title":"preferred_supplier","required":["kind"],"properties":{"kind":{"const":"preferred_supplier"}}},{"type":"object","title":"donor_yard_vehicle_match","required":["kind"],"properties":{"kind":{"const":"donor_yard_vehicle_match"}}}]},"offers.Recording":{"oneOf":[{"const":"skip"},{"const":"append"}]},"offers.Request":{"type":"object","title":"offers.Request","required":["demand","plan"],"properties":{"demand":{"$ref":"#/components/schemas/offers.demand.Demand"},"limits":{"$ref":"#/components/schemas/offers.Limits"},"plan":{"$ref":"#/components/schemas/offers.plan.Plan"},"record":{"$ref":"#/components/schemas/offers.Recording"}}},"offers.Run":{"oneOf":[{"type":"object","title":"unrecorded","required":["kind"],"properties":{"kind":{"const":"unrecorded"}}},{"description":"Store the recommendation id as the run's reference, not the response.","type":"object","title":"recorded","required":["kind","recommendation_id"],"properties":{"kind":{"const":"recorded"},"recommendation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"offers.Sensitivity":{"oneOf":[{"const":"time_sensitive"},{"const":"cost_sensitive"}]},"offers.Status":{"oneOf":[{"const":"cleared"},{"const":"held"}]},"offers.SupplierRequest":{"type":"object","title":"offers.SupplierRequest","required":["job_id","parts","plan"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"limits":{"$ref":"#/components/schemas/offers.Limits"},"parts":{"description":"The job's parts as the supplier sees them, in place of the job's estimated parts.","type":"array","items":{"$ref":"#/components/schemas/offers.Part"}},"plan":{"$ref":"#/components/schemas/offers.plan.Plan"}}},"offers.Unsupported":{"oneOf":[{"const":"demand"},{"const":"stage"},{"const":"upstream"},{"const":"policy"},{"const":"supplier_filter"},{"const":"source_selection"},{"const":"record"}]},"offers.Withheld":{"oneOf":[{"const":"withheld"}]},"offers.alternative.Alternative":{"oneOf":[{"type":"object","title":"offers.requirement.Line","required":["identity","kind","part","quantity"],"properties":{"identity":{"$ref":"#/components/schemas/offer_recommendation.Identity"},"kind":{"const":"part"},"part":{"$ref":"#/components/schemas/offers.part.Key"},"quantity":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"all","required":["all","kind"],"properties":{"all":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.requirement.Line"}},"kind":{"const":"all"}}}]},"offers.basket.Basket":{"type":"object","title":"offers.basket.Basket","required":["fulfillment","kind","lines","rank","totals"],"properties":{"fulfillment":{"$ref":"#/components/schemas/offers.basket.Fulfillment"},"kind":{"$ref":"#/components/schemas/offers.basket.Kind"},"lines":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.basket.Line"}},"rank":{"$ref":"#/components/schemas/offers.basket.Rank"},"totals":{"$ref":"#/components/schemas/offers.basket.Totals"}}},"offers.basket.Entry":{"type":"object","title":"offers.basket.Entry","required":["key","outcome"],"properties":{"key":{"$ref":"#/components/schemas/std.string.String"},"outcome":{"oneOf":[{"type":"object","title":"complete<std.vec.Vec<offers.basket.Basket>>","required":["kind","value"],"properties":{"kind":{"const":"complete"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.basket.Basket"}}}},{"type":"object","title":"partial<std.vec.Vec<offers.basket.Basket>>","required":["issues","kind","value"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.issue.Issue"}},"kind":{"const":"partial"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.basket.Basket"}}}},{"type":"object","title":"failed<std.vec.Vec<offers.basket.Basket>>","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"failed"}}}]}}},"offers.basket.Fulfillment":{"oneOf":[{"type":"object","title":"complete","required":["kind"],"properties":{"kind":{"const":"complete"}}},{"type":"object","title":"incomplete","required":["kind","uncovered"],"properties":{"kind":{"const":"incomplete"},"uncovered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.part.Key"}}}}]},"offers.basket.Kind":{"oneOf":[{"type":"object","title":"supplier","required":["kind","supplier"],"properties":{"kind":{"const":"supplier"},"supplier":{"$ref":"#/components/schemas/offers.business.Key"}}},{"type":"object","title":"general","required":["kind"],"properties":{"kind":{"const":"general"}}}]},"offers.basket.Line":{"type":"object","title":"offers.basket.Line","required":["covers","offer","quantity"],"properties":{"covers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.part.Key"}},"offer":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"$ref":"#/components/schemas/u16"}}},"offers.basket.Rank":{"oneOf":[{"const":"best"},{"const":"general"}]},"offers.basket.Totals":{"type":"object","title":"offers.basket.Totals","required":["icop","margin","price","shipping_eta","shipping_price","used_parts"],"properties":{"icop":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"margin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_eta":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"used_parts":{"$ref":"#/components/schemas/u32"}}},"offers.business.Key":{"type":"object","title":"offers.business.Key","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offers.demand.Demand":{"oneOf":[{"type":"object","title":"job","required":["job_id","kind"],"properties":{"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"job"}}},{"type":"object","title":"parts","required":["kind","parts"],"properties":{"kind":{"const":"parts"},"parts":{"$ref":"#/components/schemas/offers.parts.Unchecked"}}}]},"offers.issue.Code":{"oneOf":[{"const":"timed_out"},{"const":"pipeline_failed"},{"const":"ranking_unavailable"},{"const":"unsupported_item_kind"}]},"offers.issue.Issue":{"type":"object","title":"offers.issue.Issue","required":["code","message"],"properties":{"code":{"$ref":"#/components/schemas/offers.issue.Code"},"message":{"$ref":"#/components/schemas/std.string.String"}}},"offers.offer.Availability":{"oneOf":[{"type":"object","title":"available","required":["kind"],"properties":{"kind":{"const":"available"}}},{"type":"object","title":"unavailable","required":["kind","reason"],"properties":{"kind":{"const":"unavailable"},"reason":{"$ref":"#/components/schemas/std.string.String"}}}]},"offers.offer.Backorder":{"oneOf":[{"const":"allowed"},{"const":"disallowed"}]},"offers.offer.Bundle":{"type":"object","title":"offers.offer.Bundle","required":["id","lines"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"lines":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.offer.BundleLine"}}}},"offers.offer.BundleLine":{"type":"object","title":"offers.offer.BundleLine","required":["quantity","unit"],"properties":{"quantity":{"$ref":"#/components/schemas/u32"},"unit":{"$ref":"#/components/schemas/offers.offer.Unit"}}},"offers.offer.CostModel":{"oneOf":[{"const":"per_unit"},{"const":"per_purchase"}]},"offers.offer.Cover":{"type":"object","title":"offers.offer.Cover","required":["availability","ghca_id","interchange_quantity","part","rrp","verdict"],"properties":{"availability":{"$ref":"#/components/schemas/offers.offer.Availability"},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"interchange_quantity":{"$ref":"#/components/schemas/u16"},"part":{"$ref":"#/components/schemas/offers.part.Key"},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"verdict":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Verdict"}]}}},"offers.offer.Disposition":{"oneOf":[{"type":"object","title":"pooled","required":["kind"],"properties":{"kind":{"const":"pooled"}}},{"type":"object","title":"excluded","required":["issue","kind"],"properties":{"issue":{"$ref":"#/components/schemas/offers.issue.Issue"},"kind":{"const":"excluded"}}}]},"offers.offer.Group":{"type":"object","title":"offers.offer.Group","required":["members","part"],"properties":{"members":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.offer.Member"}},"part":{"$ref":"#/components/schemas/offers.part.Key"}}},"offers.offer.Inventory":{"oneOf":[{"type":"object","title":"finite","required":["kind","units"],"properties":{"kind":{"const":"finite"},"units":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"infinite","required":["kind"],"properties":{"kind":{"const":"infinite"}}}]},"offers.offer.Item":{"oneOf":[{"type":"object","title":"single","required":["kind","single"],"properties":{"kind":{"const":"single"},"single":{"$ref":"#/components/schemas/offers.offer.Single"}}},{"type":"object","title":"group","required":["group","kind"],"properties":{"group":{"$ref":"#/components/schemas/offers.offer.Group"},"kind":{"const":"group"}}}]},"offers.offer.Key":{"oneOf":[{"type":"object","title":"sellable","required":["kind","product"],"properties":{"kind":{"const":"sellable"},"product":{"$ref":"#/components/schemas/offers.product.Key"}}},{"type":"object","title":"provisional","required":["kind","part","supplier"],"properties":{"kind":{"const":"provisional"},"part":{"$ref":"#/components/schemas/offers.part.Key"},"supplier":{"$ref":"#/components/schemas/offers.business.Key"}}},{"type":"object","title":"bundle","required":["bundle_id","kind","supplier"],"properties":{"bundle_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"bundle"},"supplier":{"$ref":"#/components/schemas/offers.business.Key"}}},{"type":"object","title":"group","required":["group_id","kind","part","supplier"],"properties":{"group_id":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"group"},"part":{"$ref":"#/components/schemas/offers.part.Key"},"supplier":{"$ref":"#/components/schemas/offers.business.Key"}}}]},"offers.offer.Location":{"type":"object","title":"offers.offer.Location","required":["backorder","estimated_quantity","quantity","store_address_id"],"properties":{"backorder":{"$ref":"#/components/schemas/offers.offer.Backorder"},"estimated_quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offers.offer.Member":{"type":"object","title":"offers.offer.Member","required":["products","quantity"],"properties":{"products":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.product.Key"}},"quantity":{"$ref":"#/components/schemas/u16"}}},"offers.offer.Offer":{"type":"object","title":"offers.offer.Offer","required":["covers","disposition","id","item","key","stock","supplier","terms"],"properties":{"covers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.offer.Cover"}},"disposition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Disposition"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"item":{"$ref":"#/components/schemas/offers.offer.Item"},"key":{"$ref":"#/components/schemas/offers.offer.Key"},"stock":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Stock"}]},"supplier":{"$ref":"#/components/schemas/offers.business.Key"},"terms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Terms"}]}}},"offers.offer.Party":{"oneOf":[{"const":"buyer"},{"const":"supplier"}]},"offers.offer.RestockingFee":{"oneOf":[{"type":"object","title":"fixed","required":["amount","kind"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"fixed"}}},{"type":"object","title":"percentage","required":["kind","max_amount","percent"],"properties":{"kind":{"const":"percentage"},"max_amount":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"percent":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"fixed_and_percentage","required":["amount","kind","max_amount","percent"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"fixed_and_percentage"},"max_amount":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"percent":{"$ref":"#/components/schemas/std.string.String"}}}]},"offers.offer.Returns":{"oneOf":[{"type":"object","title":"not_accepted","required":["kind"],"properties":{"kind":{"const":"not_accepted"}}},{"type":"object","title":"accepted","required":["claim_window","kind","min_price","restocking_fee","return_window","shipping_paid_by"],"properties":{"claim_window":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Window"}]},"kind":{"const":"accepted"},"min_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"restocking_fee":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.RestockingFee"}]},"return_window":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Window"}]},"shipping_paid_by":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Party"}]}}},{"type":"object","title":"custom","required":["description","kind"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"custom"}}}]},"offers.offer.RuleIssue":{"oneOf":[{"const":"unknown_work_provider"},{"const":"missing_vehicle_registration_date"},{"const":"missing_hca"},{"const":"unexpected_error"}]},"offers.offer.ShippingTime":{"type":"object","title":"offers.offer.ShippingTime","required":["arrival_time","business_days","eta","store_address_id"],"properties":{"arrival_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"business_days":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"eta":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offers.offer.Single":{"oneOf":[{"type":"object","title":"unit","required":["kind","unit"],"properties":{"kind":{"const":"unit"},"unit":{"$ref":"#/components/schemas/offers.offer.Unit"}}},{"type":"object","title":"bundle","required":["bundle","kind"],"properties":{"bundle":{"$ref":"#/components/schemas/offers.offer.Bundle"},"kind":{"const":"bundle"}}}]},"offers.offer.Stock":{"type":"object","title":"offers.offer.Stock","required":["inventory","locations"],"properties":{"inventory":{"$ref":"#/components/schemas/offers.offer.Inventory"},"locations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.offer.Location"}}}},"offers.offer.Terms":{"type":"object","title":"offers.offer.Terms","required":["cost_model","icop","margin","price","returns","shipping_price","shipping_time"],"properties":{"cost_model":{"$ref":"#/components/schemas/offers.offer.CostModel"},"icop":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"margin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"returns":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.Returns"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.offer.ShippingTime"}]}}},"offers.offer.Unit":{"oneOf":[{"type":"object","title":"sellable","required":["kind","product"],"properties":{"kind":{"const":"sellable"},"product":{"$ref":"#/components/schemas/offers.product.Key"}}},{"type":"object","title":"provisional","required":["kind","part"],"properties":{"kind":{"const":"provisional"},"part":{"$ref":"#/components/schemas/offers.part.Key"}}}]},"offers.offer.Verdict":{"oneOf":[{"type":"object","title":"allowed","required":["kind"],"properties":{"kind":{"const":"allowed"}}},{"type":"object","title":"disallowed","required":["kind","reason"],"properties":{"kind":{"const":"disallowed"},"reason":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"The work provider's rule could not be evaluated for this offer, so it is neither allowed nor disallowed.","type":"object","title":"unchecked","required":["issues","kind"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.offer.RuleIssue"}},"kind":{"const":"unchecked"}}}]},"offers.offer.Window":{"oneOf":[{"type":"object","title":"days","required":["count","kind"],"properties":{"count":{"$ref":"#/components/schemas/u16"},"kind":{"const":"days"}}},{"type":"object","title":"until","required":["date","kind"],"properties":{"date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"until"}}}]},"offers.part.Key":{"oneOf":[{"type":"object","title":"job","required":["kind","part_id"],"properties":{"kind":{"const":"job"},"part_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"supplier_added","required":["kind","source_item_id"],"properties":{"kind":{"const":"supplier_added"},"source_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"requested","required":["key","kind"],"properties":{"key":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"requested"}}}]},"offers.parts.Unchecked":{"type":"object","title":"offers.parts.Unchecked","required":["buyer","requirements","site"],"properties":{"buyer":{"$ref":"#/components/schemas/offers.business.Key"},"requirements":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/offers.requirement.Requirement"}},"site":{"$ref":"#/components/schemas/offers.business.Key"}}},"offers.plan.Fetch":{"type":"object","title":"offers.plan.Fetch","required":["sources"],"properties":{"interchange":{"$ref":"#/components/schemas/offers.plan.Interchange"},"sources":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.plan.Source"}},"suppliers":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.business.Key"}}]}}},"offers.plan.Interchange":{"type":"object","title":"offers.plan.Interchange","properties":{"depth":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"qualifiers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.Qualifier"}}}},"offers.plan.Plan":{"oneOf":[{"type":"object","title":"search","required":["fetch","through"],"properties":{"fetch":{"$ref":"#/components/schemas/offers.plan.Fetch"},"through":{"const":"search"}}},{"type":"object","title":"price","required":["fetch","through"],"properties":{"fetch":{"$ref":"#/components/schemas/offers.plan.Fetch"},"price":{"$ref":"#/components/schemas/offers.policy.Rules"},"through":{"const":"price"}}},{"type":"object","title":"assess","required":["fetch","through"],"properties":{"assess":{"$ref":"#/components/schemas/offers.policy.Rules"},"fetch":{"$ref":"#/components/schemas/offers.plan.Fetch"},"price":{"$ref":"#/components/schemas/offers.policy.Rules"},"through":{"const":"assess"}}},{"type":"object","title":"basket","required":["baskets","from","through"],"properties":{"baskets":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/offers.policy.Basket"}},"from":{"$ref":"#/components/schemas/offers.plan.Upstream"},"through":{"const":"basket"}}},{"type":"object","title":"rank","required":["baskets","from","through"],"properties":{"baskets":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/offers.policy.Basket"}},"from":{"$ref":"#/components/schemas/offers.plan.Upstream"},"rank":{"$ref":"#/components/schemas/offers.policy.Ranking"},"through":{"const":"rank"}}}]},"offers.plan.Source":{"oneOf":[{"const":"quoted"},{"const":"catalog"},{"const":"donor"},{"const":"provisional"}]},"offers.plan.Upstream":{"oneOf":[{"type":"object","title":"fetch","required":["fetch","kind"],"properties":{"assess":{"$ref":"#/components/schemas/offers.policy.Rules"},"fetch":{"$ref":"#/components/schemas/offers.plan.Fetch"},"kind":{"const":"fetch"},"price":{"$ref":"#/components/schemas/offers.policy.Rules"}}},{"type":"object","title":"recorded","required":["kind","recommendation_id"],"properties":{"kind":{"const":"recorded"},"recommendation_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"offers.policy.Basket":{"oneOf":[{"type":"object","title":"resolved","required":["kind"],"properties":{"kind":{"const":"resolved"}}},{"type":"object","title":"stored","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"stored"}}},{"type":"object","title":"inline","required":["definition","kind"],"properties":{"definition":{"oneOf":[{"description":"the array of stages acts as an priority ordered list. evaluation is stopped after the first\nsuccessful stage","type":"object","title":"waterfall<basket_builder_offer.Preference, basket_builder.Filter>","required":["rank","stages","type"],"properties":{"rank":{"$ref":"#/components/schemas/basket_builder.Rank"},"stages":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Stage<basket_builder_offer.Preference, basket_builder.Filter>","required":["algorithm","partition","strategy"],"properties":{"algorithm":{"oneOf":[{"description":"offers are scored using a weighted sum of their scores against each criterion, and the\noffer with the best score is selected.","type":"object","title":"weighted<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder_offer.WeightedCriterion<basket_builder_offer.Preference>","required":["criterion","weight"],"properties":{"criterion":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]},"weight":{"$ref":"#/components/schemas/std.string.String"}}}},"type":{"const":"weighted"}}},{"description":"offers are compared against each other using each criterion in priority order, and the\noffer that wins the most important criterion is selected. if there is a tie, the\nnext criterion is used as a tiebreaker, and so on.","type":"object","title":"lexicographic<basket_builder_offer.Preference>","required":["criteria","type"],"properties":{"criteria":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"metric<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"metric"},"value":{"oneOf":[{"type":"object","title":"asc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"asc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}},{"type":"object","title":"desc<basket_builder_offer.Metric>","required":["type","value"],"properties":{"type":{"const":"desc"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Metric"}}}]}}},{"type":"object","title":"preference<basket_builder_offer.Preference>","required":["type","value"],"properties":{"type":{"const":"preference"},"value":{"$ref":"#/components/schemas/basket_builder_offer.Preference"}}}]}},"type":{"const":"lexicographic"}}}]},"partition":{"$ref":"#/components/schemas/basket_builder.Partition"},"strategy":{"oneOf":[{"description":"each step is inclusive of the offers from the previous steps.","type":"object","title":"cascade<basket_builder.Filter>","required":["steps","type"],"properties":{"steps":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"basket_builder.Step<basket_builder.Filter>","properties":{"filter":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/basket_builder.Filter"}]}}}},"type":{"const":"cascade"}}}]}}}},"type":{"const":"waterfall"}}}]},"kind":{"const":"inline"}}}]},"offers.policy.Ranking":{"oneOf":[{"type":"object","title":"resolved","required":["kind"],"properties":{"kind":{"const":"resolved"}}},{"type":"object","title":"stored","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"stored"}}}]},"offers.policy.Rules":{"oneOf":[{"type":"object","title":"resolved","required":["kind"],"properties":{"kind":{"const":"resolved"}}}]},"offers.product.AftermarketSource":{"oneOf":[{"const":"oes"},{"const":"independent"}]},"offers.product.Brand":{"type":"object","title":"offers.product.Brand","required":["oem","oes"],"properties":{"oem":{"$ref":"#/components/schemas/offers.product.Oem"},"oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.product.Oes"}]}}},"offers.product.Certification":{"oneOf":[{"const":"certified"},{"const":"uncertified"}]},"offers.product.Condition":{"oneOf":[{"type":"object","title":"new","required":["kind"],"properties":{"kind":{"const":"new"}}},{"type":"object","title":"used","required":["grade","kind"],"properties":{"grade":{"$ref":"#/components/schemas/offers.product.UsedGrade"},"kind":{"const":"used"}}}]},"offers.product.Image":{"type":"object","title":"offers.product.Image","required":["full","thumbnail"],"properties":{"full":{"$ref":"#/components/schemas/std.string.String"},"thumbnail":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offers.product.Key":{"type":"object","title":"offers.product.Key","required":["business_id","organization_id","sellable_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offers.product.Kind":{"oneOf":[{"const":"product"},{"const":"assembly"}]},"offers.product.Oem":{"oneOf":[{"const":"oem"},{"const":"not_oem"}]},"offers.product.Oes":{"oneOf":[{"const":"oes"},{"const":"not_oes"}]},"offers.product.PanelGrade":{"oneOf":[{"const":"grade0"},{"const":"grade_a"},{"const":"grade_b"},{"const":"grade_c"}]},"offers.product.Product":{"type":"object","title":"offers.product.Product","required":["brand","brand_id","condition","description","images","key","kind","mpn","name","original_mpn","parent","part_type_id","position_id","retail_price","sku","supply_type","tags"],"properties":{"brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.product.Brand"}]},"brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.product.Condition"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers.product.Image"}},"key":{"$ref":"#/components/schemas/offers.product.Key"},"kind":{"$ref":"#/components/schemas/offers.product.Kind"},"mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"original_mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parent":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers.product.Key"}]},"part_type_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"position_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sku":{"$ref":"#/components/schemas/std.string.String"},"supply_type":{"$ref":"#/components/schemas/offers.product.SupplyType"},"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"offers.product.RecycledGrade":{"oneOf":[{"const":"grade0"},{"const":"grade_a"},{"const":"grade_b"},{"const":"grade_c"},{"const":"remanufactured"}]},"offers.product.SupplyType":{"oneOf":[{"type":"object","title":"genuine","required":["kind"],"properties":{"kind":{"const":"genuine"}}},{"type":"object","title":"aftermarket","required":["certification","kind","source"],"properties":{"certification":{"$ref":"#/components/schemas/offers.product.Certification"},"kind":{"const":"aftermarket"},"source":{"$ref":"#/components/schemas/offers.product.AftermarketSource"}}},{"type":"object","title":"performance_custom","required":["kind"],"properties":{"kind":{"const":"performance_custom"}}},{"type":"object","title":"recycled","required":["grade","kind"],"properties":{"grade":{"$ref":"#/components/schemas/offers.product.RecycledGrade"},"kind":{"const":"recycled"}}}]},"offers.product.UsedGrade":{"oneOf":[{"type":"object","title":"panel","required":["grade","kind"],"properties":{"grade":{"$ref":"#/components/schemas/offers.product.PanelGrade"},"kind":{"const":"panel"}}},{"type":"object","title":"distance_traveled","required":["kilometres","kind"],"properties":{"kilometres":{"$ref":"#/components/schemas/u32"},"kind":{"const":"distance_traveled"}}},{"type":"object","title":"operation_hours","required":["hours","kind"],"properties":{"hours":{"$ref":"#/components/schemas/u32"},"kind":{"const":"operation_hours"}}},{"type":"object","title":"remaining_thickness","required":["kind","millimetres"],"properties":{"kind":{"const":"remaining_thickness"},"millimetres":{"$ref":"#/components/schemas/std.string.String"}}}]},"offers.requirement.Line":{"type":"object","title":"offers.requirement.Line","required":["identity","part","quantity"],"properties":{"identity":{"$ref":"#/components/schemas/offer_recommendation.Identity"},"part":{"$ref":"#/components/schemas/offers.part.Key"},"quantity":{"$ref":"#/components/schemas/u32"}}},"offers.requirement.Requirement":{"oneOf":[{"type":"object","title":"offers.requirement.Line","required":["identity","kind","part","quantity"],"properties":{"identity":{"$ref":"#/components/schemas/offer_recommendation.Identity"},"kind":{"const":"part"},"part":{"$ref":"#/components/schemas/offers.part.Key"},"quantity":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"any","required":["any","kind"],"properties":{"any":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/offers.alternative.Alternative"}},"kind":{"const":"any"}}}]},"offers.stage.Ranking":{"oneOf":[{"type":"object","title":"decided","required":["kind","ranking"],"properties":{"kind":{"const":"decided"},"ranking":{"$ref":"#/components/schemas/offer_recommendation.Ranking"}}},{"type":"object","title":"gated","required":["kind"],"properties":{"kind":{"const":"gated"}}},{"type":"object","title":"unbound","required":["kind"],"properties":{"kind":{"const":"unbound"}}}]},"offers.supplier.Supplier":{"type":"object","title":"offers.supplier.Supplier","required":["key","name"],"properties":{"key":{"$ref":"#/components/schemas/offers.business.Key"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"offers_search.Assembly":{"type":"object","title":"offers_search.Assembly","required":["children","sellable"],"properties":{"assembled_into":{"description":"The parent assembly if this assembly is a sub-assembly","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.Assembly"}]},"children":{"description":"The children sellables of the assembly","type":"array","items":{"$ref":"#/components/schemas/offers_search.Product"}},"sellable":{"description":"The sellable of the assembly","$ref":"#/components/schemas/offers_search.Product"}}},"offers_search.Basket":{"oneOf":[{"description":"A basket of parts from a single supplier","type":"object","title":"offers_search.SupplierBasket","required":["basket_type","metadata","recommendations","supplier","supplier_score","type"],"properties":{"basket_type":{"description":"Type of basket (recommended or confirmed)","$ref":"#/components/schemas/offers_search.BasketType"},"metadata":{"description":"Additional basket metadata","$ref":"#/components/schemas/offers_search.BasketMetadata"},"recommendations":{"description":"List of recommended parts from this supplier","type":"array","items":{"$ref":"#/components/schemas/offers_search.Recommendation"}},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"supplier":{"description":"The supplier providing the parts","$ref":"#/components/schemas/offer_recommendation.Supplier"},"supplier_score":{"description":"Score used to rank suppliers, higher scores indicate preferred suppliers","$ref":"#/components/schemas/f64"},"type":{"const":"single_supplier"}}},{"type":"object","title":"offers_search.SplitBasket","required":["basket_score","basket_type","metadata","suppliers","type"],"properties":{"basket_score":{"$ref":"#/components/schemas/f64"},"basket_type":{"$ref":"#/components/schemas/offers_search.BasketType"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.BasketMetadata"}]},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.SupplierContribution"}},"type":{"const":"split"}}}]},"offers_search.BasketMetadata":{"description":"Additional metadata about a supplier basket","type":"object","title":"offers_search.BasketMetadata","required":["fulfillment_status","rank","used_part_count"],"properties":{"estimated_delivery":{"description":"Estimated delivery date/time","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"fulfillment_status":{"description":"Current fulfillment status","$ref":"#/components/schemas/offers_search.FulfillmentStatus"},"rank":{"$ref":"#/components/schemas/offers_search.BasketRank"},"shipping_cost":{"description":"Shipping cost details","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.ShippingCost"}]},"total_price":{"description":"Total price of all parts in the basket","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"used_part_count":{"description":"Number of used parts in the basket","$ref":"#/components/schemas/usize"}}},"offers_search.BasketRank":{"oneOf":[{"const":"best"},{"const":"standard"}]},"offers_search.BasketType":{"oneOf":[{"description":"System recommended basket","type":"object","title":"recommended","required":["recommended"],"properties":{"recommended":{"description":"System recommended basket","type":"object","title":"recommended","properties":{"offer_request_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}}}}]},"offers_search.FulfillmentStatus":{"oneOf":[{"const":"complete","description":"Basket is complete and ready to be fulfilled"},{"description":"Basket is incomplete with some parts fulfilled","type":"object","title":"incomplete","required":["incomplete"],"properties":{"incomplete":{"description":"Basket is incomplete with some parts fulfilled","type":"object","title":"incomplete","required":["fulfilled_parts"],"properties":{"fulfilled_parts":{"$ref":"#/components/schemas/u32"}}}}}]},"offers_search.GroupOfferStatus":{"oneOf":[{"const":"available"},{"type":"object","title":"unavailable","required":["unavailable"],"properties":{"unavailable":{"type":"object","title":"unavailable","required":["part_identities"],"properties":{"part_identities":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offer_recommendation.Identity"}}}}}}]},"offers_search.JobPartMatch":{"description":"Represents a match between a requested job part and an available offer.\nThis structure links a part requested by the buyer with a specific offer that can fulfill it.","type":"object","title":"offers_search.JobPartMatch","required":["evaluation","gapc_part_identity","job_part_id","offer_id","offer_part_id","purchasable"],"properties":{"evaluation":{"description":"Output from configured purchasing rules","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.JobPartMatchEvaluation"}]},"gapc_part_identity":{"description":"The gapc part identity of the part that was matched","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Identity"}]},"job_part_id":{"description":"The UUID from the original search request that uniquely identifies the requested job part","$ref":"#/components/schemas/uuid.Uuid"},"offer_id":{"description":"References the ID of the matching offer in the offers array.","$ref":"#/components/schemas/std.string.String"},"offer_part_id":{"description":"References the specific sellable entity ID within the offer. For single offers,\nthis will match the sellable's ID. For composite offers (groups/assemblies),\nthis identifies the specific component that matches the requested part","$ref":"#/components/schemas/uuid.Uuid"},"purchasable":{"$ref":"#/components/schemas/offers_search.JobPartPurchasable"}}},"offers_search.JobPartMatchEvaluation":{"allOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.OfferRuleEvaluation"}]},{"type":"object","title":"offers_search.JobPartMatchEvaluation","required":["errors"],"properties":{"errors":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_rules.OfferRuleError"}}}}]},"offers_search.JobPartPurchasable":{"oneOf":[{"type":"object","title":"allowed","required":["type"],"properties":{"type":{"const":"allowed"}}},{"type":"object","title":"disallowed","required":["reason","type"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"disallowed"}}}]},"offers_search.JobReadiness":{"oneOf":[{"const":"ready","description":"Job is ready for parts ordering"},{"const":"pending","description":"Job is pending additional responses or baskets"}]},"offers_search.JobSensitivity":{"oneOf":[{"const":"time_sensitive","description":"Prioritize faster delivery over cost optimization"},{"const":"cost_sensitive","description":"Prioritize cost optimization over delivery speed"}]},"offers_search.Offer":{"allOf":[{"$ref":"#/components/schemas/offers_search.OfferKind"},{"type":"object","title":"offers_search.Offer","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"}}}]},"offers_search.OfferKind":{"oneOf":[{"type":"object","title":"offers_search.SellableOffer","required":["business","payload","type"],"properties":{"business":{"$ref":"#/components/schemas/offer_recommendation.Supplier"},"payload":{"$ref":"#/components/schemas/offers_search.SellableKind"},"return_policy":{"description":"The supplier's return terms, set only for procurement-sourced offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"single"}}},{"type":"object","title":"offers_search.SellableGroup","required":["offers","status","type"],"properties":{"offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.SellableOffer"}},"status":{"$ref":"#/components/schemas/offers_search.GroupOfferStatus"},"type":{"const":"group"}}},{"type":"object","title":"request","required":["note","offer","type"],"properties":{"is_override":{"description":"nullable for baskwards compatibility","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"offer":{"$ref":"#/components/schemas/offers_search.SellableOffer"},"subject":{"description":"nullable for baskwards compatibility","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_request.SubjectV2"}]},"type":{"const":"request"}}},{"type":"object","title":"offers_search.ProvisionalOffer","required":["business","rrp","type"],"properties":{"business":{"$ref":"#/components/schemas/offer_recommendation.Supplier"},"margin":{"description":"commerce-rule margin estimate on top of `price` for the job's work provider, display-only","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"price":{"description":"commerce-rule estimate, display-only","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"provisional"}}}]},"offers_search.OfferRequestRecommendation":{"description":"Groups offer requests by supplier with associated business details","type":"object","title":"offers_search.OfferRequestRecommendation","required":["rationale","score","supplier"],"properties":{"automatic_request_allowed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"rationale":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.RecommendationRationale"}},"score":{"description":"Score used to rank recommendations. Higher scores are better.","$ref":"#/components/schemas/f64"},"supplier":{"$ref":"#/components/schemas/offer_recommendation.Supplier"}}},"offers_search.PartRequest":{"type":"object","title":"offers_search.PartRequest","required":["description","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"gapc_part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offer_recommendation.Identity"}]},"job_part_id":{"description":"nullable for backwards compatibility","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"quantity":{"$ref":"#/components/schemas/u8"},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offers_search.Product":{"type":"object","title":"offers_search.Product","required":["count","entity","price"],"properties":{"count":{"description":"The stock quantity required to fulfill the part supersession. This will often be one,\nbut can be higher for group supersessions.\ne.g.\nA -> 2B + 3C\nSellable for A will have the quantity one, but sellables for B and C will have a quantity of\n2 and 3, respectively.\n\ntodo: rename to supersession_quantity","$ref":"#/components/schemas/u16"},"entity":{"$ref":"#/components/schemas/offers_search.SellableEntity"},"gapc_attribute_values":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttributeValue"}}]},"gapc_brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcBrand"}]},"gapc_part":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPart"}]},"gapc_part_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartType"}]},"icop":{"description":"price + margin","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"inventories":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.SellableInventory"}},"margin":{"description":"margin amount on top of `price` for the job's work provider","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parent_assembly_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.ShippingTime"}]},"supply_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.SupplyType"}]},"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableTag"}},"uploads":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.Upload"}}}},"offers_search.ProvisionalOffer":{"type":"object","title":"offers_search.ProvisionalOffer","required":["business","rrp"],"properties":{"business":{"$ref":"#/components/schemas/offer_recommendation.Supplier"},"margin":{"description":"commerce-rule margin estimate on top of `price` for the job's work provider, display-only","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"price":{"description":"commerce-rule estimate, display-only","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"offers_search.Recommendation":{"type":"object","title":"offers_search.Recommendation","required":["match_index","quantity"],"properties":{"match_index":{"$ref":"#/components/schemas/usize"},"quantity":{"$ref":"#/components/schemas/u32"}}},"offers_search.RecommendationRationale":{"oneOf":[{"type":"object","title":"matched_job_parts","required":["job_part_ids","type"],"properties":{"job_part_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"type":{"const":"matched_job_parts"}}},{"type":"object","title":"donor_yard_vehicle_match","required":["type"],"properties":{"type":{"const":"donor_yard_vehicle_match"}}},{"type":"object","title":"preferred_supplier","required":["type"],"properties":{"type":{"const":"preferred_supplier"}}}]},"offers_search.Recommendations":{"description":"Contains different recommendation strategies for part baskets","type":"object","title":"offers_search.Recommendations","required":["baskets"],"properties":{"baskets":{"$ref":"#/components/schemas/offers_search.RecommendedBaskets"}}},"offers_search.RecommendedBaskets":{"type":"object","title":"offers_search.RecommendedBaskets","required":["best","cheapest","fastest"],"properties":{"best":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Recommendation"}},"cheapest":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Recommendation"}},"fastest":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Recommendation"}}}},"offers_search.SellableEntity":{"type":"object","title":"offers_search.SellableEntity","required":["id","is_listable","sku","store_id"],"properties":{"associated_hca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"barcode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellableCondition"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gapc_part_id":{"description":"The part id that this sellable is linked with.\nNote that this is a part id in the scope of the same store where the sellable is.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"is_listable":{"$ref":"#/components/schemas/bool"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sellable_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SellableKind"}]},"sku":{"$ref":"#/components/schemas/std.string.String"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offers_search.SellableGroup":{"type":"object","title":"offers_search.SellableGroup","required":["offers","status"],"properties":{"offers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.SellableOffer"}},"status":{"$ref":"#/components/schemas/offers_search.GroupOfferStatus"}}},"offers_search.SellableInventory":{"type":"object","title":"offers_search.SellableInventory","required":["created_at","product_id","quantity","store_address_id","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"estimated_quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"is_backorderable":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"product_id":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_address_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"offers_search.SellableKind":{"oneOf":[{"type":"object","title":"offers_search.Product","required":["count","entity","kind","price"],"properties":{"count":{"description":"The stock quantity required to fulfill the part supersession. This will often be one,\nbut can be higher for group supersessions.\ne.g.\nA -> 2B + 3C\nSellable for A will have the quantity one, but sellables for B and C will have a quantity of\n2 and 3, respectively.\n\ntodo: rename to supersession_quantity","$ref":"#/components/schemas/u16"},"entity":{"$ref":"#/components/schemas/offers_search.SellableEntity"},"gapc_attribute_values":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.GapcAttributeValue"}}]},"gapc_brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcBrand"}]},"gapc_part":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPart"}]},"gapc_part_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartType"}]},"icop":{"description":"price + margin","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"inventories":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.SellableInventory"}},"kind":{"const":"product"},"margin":{"description":"margin amount on top of `price` for the job's work provider","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parent_assembly_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.ShippingTime"}]},"supply_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/business_rules.SupplyType"}]},"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.SellableTag"}},"uploads":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.Upload"}}}},{"type":"object","title":"offers_search.Assembly","required":["children","kind","sellable"],"properties":{"assembled_into":{"description":"The parent assembly if this assembly is a sub-assembly","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.Assembly"}]},"children":{"description":"The children sellables of the assembly","type":"array","items":{"$ref":"#/components/schemas/offers_search.Product"}},"kind":{"const":"assembly"},"sellable":{"description":"The sellable of the assembly","$ref":"#/components/schemas/offers_search.Product"}}}]},"offers_search.SellableOffer":{"type":"object","title":"offers_search.SellableOffer","required":["business","payload"],"properties":{"business":{"$ref":"#/components/schemas/offer_recommendation.Supplier"},"payload":{"$ref":"#/components/schemas/offers_search.SellableKind"},"return_policy":{"description":"The supplier's return terms, set only for procurement-sourced offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"offers_search.ShippingCost":{"description":"Shipping cost with currency","type":"object","title":"offers_search.ShippingCost","required":["amount","currency"],"properties":{"amount":{"description":"Cost amount","$ref":"#/components/schemas/std.string.String"},"currency":{"description":"Currency code","$ref":"#/components/schemas/std.string.String"}}},"offers_search.ShippingTime":{"type":"object","title":"offers_search.ShippingTime","required":["arrival_time","business_days","eta","store_address_id"],"properties":{"arrival_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"business_days":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"eta":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"offers_search.SplitBasket":{"type":"object","title":"offers_search.SplitBasket","required":["basket_score","basket_type","metadata","suppliers"],"properties":{"basket_score":{"$ref":"#/components/schemas/f64"},"basket_type":{"$ref":"#/components/schemas/offers_search.BasketType"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/offers_search.BasketMetadata"}]},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.SupplierContribution"}}}},"offers_search.SupplierBasket":{"description":"A basket of parts from a single supplier","type":"object","title":"offers_search.SupplierBasket","required":["basket_type","metadata","recommendations","supplier","supplier_score"],"properties":{"basket_type":{"description":"Type of basket (recommended or confirmed)","$ref":"#/components/schemas/offers_search.BasketType"},"metadata":{"description":"Additional basket metadata","$ref":"#/components/schemas/offers_search.BasketMetadata"},"recommendations":{"description":"List of recommended parts from this supplier","type":"array","items":{"$ref":"#/components/schemas/offers_search.Recommendation"}},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"supplier":{"description":"The supplier providing the parts","$ref":"#/components/schemas/offer_recommendation.Supplier"},"supplier_score":{"description":"Score used to rank suppliers, higher scores indicate preferred suppliers","$ref":"#/components/schemas/f64"}}},"offers_search.SupplierContribution":{"type":"object","title":"offers_search.SupplierContribution","required":["recommendations","supplier"],"properties":{"recommendations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/offers_search.Recommendation"}},"supplier":{"$ref":"#/components/schemas/offer_recommendation.Supplier"}}},"onboarding.Address":{"description":"Postal address — used for the business address on every kind, and\nfor per-site addresses on the repairer payload.\n\nEvery field defaults to empty string when reading. The intake API\nvalidates whatever the client sends; the read path treats stored\npayloads as best-effort and tolerates anything (missing fields,\nwrong types in nested values, etc.) rather than 500-ing.","type":"object","title":"onboarding.Address","required":["city","country","geo","postcode","state","street_name","street_number","suburb"],"properties":{"city":{"$ref":"#/components/schemas/std.string.String"},"country":{"$ref":"#/components/schemas/std.string.String"},"geo":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/onboarding.GeoLocation"}]},"postcode":{"$ref":"#/components/schemas/std.string.String"},"state":{"description":"State / county / region — label is country-specific (UI relabels;\nAPI stays uniform).","$ref":"#/components/schemas/std.string.String"},"street_name":{"$ref":"#/components/schemas/std.string.String"},"street_number":{"$ref":"#/components/schemas/std.string.String"},"suburb":{"$ref":"#/components/schemas/std.string.String"}}},"onboarding.GeoLocation":{"type":"object","title":"onboarding.GeoLocation","required":["latitude","longitude"],"properties":{"latitude":{"$ref":"#/components/schemas/f64"},"longitude":{"$ref":"#/components/schemas/f64"}}},"onboarding.MakesListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"onboarding.SubmitError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid","required":["invalid"],"properties":{"invalid":{"type":"object","title":"invalid","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"rate_limited"}]},"onboarding.SubmitResponse":{"type":"object","title":"onboarding.SubmitResponse","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"onboarding.TeamMember":{"description":"Team member captured on intake. First/last separation is intentional\n(HubSpot contacts are structured this way; admin sync is cleaner).","type":"object","title":"onboarding.TeamMember","required":["email","first_name","last_name"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"},"first_name":{"$ref":"#/components/schemas/std.string.String"},"last_name":{"$ref":"#/components/schemas/std.string.String"}}},"onboarding.WorkProvidersListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"onboarding.repairer.RepairerSiteIntake":{"description":"One physical site / shop the repairer operates from. Each entry is\nprovisioned as a child business with `BusinessProfile::RepairerSite`.","type":"object","title":"onboarding.repairer.RepairerSiteIntake","required":["address","business_phone","name"],"properties":{"address":{"$ref":"#/components/schemas/onboarding.Address"},"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"}}},"onboarding.repairer.SubmitRequest":{"type":"object","title":"onboarding.repairer.SubmitRequest","required":["address","billing_address","billing_contact_email","billing_contact_name","billing_contact_phone","business_phone","cc_emails","country","desired_work_providers","display_company_name","general_team","management_team","notifications_emails","registered_company_name","services_offered","sites","tax_number"],"properties":{"address":{"$ref":"#/components/schemas/onboarding.Address"},"billing_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/onboarding.Address"}]},"billing_contact_email":{"$ref":"#/components/schemas/std.string.String"},"billing_contact_name":{"$ref":"#/components/schemas/std.string.String"},"billing_contact_phone":{"$ref":"#/components/schemas/std.string.String"},"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"cc_emails":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"country":{"$ref":"#/components/schemas/std.string.String"},"desired_work_providers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"display_company_name":{"$ref":"#/components/schemas/std.string.String"},"general_team":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.TeamMember"}},"management_team":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.TeamMember"}},"notifications_emails":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"registered_company_name":{"$ref":"#/components/schemas/std.string.String"},"services_offered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.repairer.input.RepairerServiceKind"}},"sites":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.repairer.RepairerSiteIntake"}},"tax_number":{"$ref":"#/components/schemas/std.string.String"}}},"onboarding.repairer.WorkProviderOption":{"description":"One entry returned from `repairer-onboarding.work-providers.list`.","type":"object","title":"onboarding.repairer.WorkProviderOption","required":["business_id","business_name","organization_id","organization_name"],"properties":{"business_id":{"$ref":"#/components/schemas/std.string.String"},"business_name":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/std.string.String"},"organization_name":{"$ref":"#/components/schemas/std.string.String"}}},"onboarding.repairer.WorkProvidersListRequest":{"description":"Public request shape for the work-providers catalogue. `country`\nscopes the lookup to a per-country whitelist; missing/empty\nwhitelist falls back to returning every insurer.","type":"object","title":"onboarding.repairer.WorkProvidersListRequest","required":["country"],"properties":{"country":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"onboarding.repairer.WorkProvidersListResponse":{"type":"object","title":"onboarding.repairer.WorkProvidersListResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.repairer.WorkProviderOption"}}}},"onboarding.repairer.input.RepairerServiceKind":{"oneOf":[{"const":"body"},{"const":"mechanical"},{"const":"paint"},{"const":"collision"},{"const":"electrical"},{"const":"other"}]},"onboarding.supplier.MakeOption":{"description":"Single make entry returned from `makes.list`. `id` is the canonical\nMakeSuid, `name` is the display-friendly value pulled from UVDB.","type":"object","title":"onboarding.supplier.MakeOption","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"onboarding.supplier.MakesListResponse":{"type":"object","title":"onboarding.supplier.MakesListResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.supplier.MakeOption"}}}},"onboarding.supplier.NewRepairerDiscount":{"description":"A discount Partly may offer a new repairer without asking the supplier\nfirst, for one brand (or \"All other brands\"). `percent` is off list price.","type":"object","title":"onboarding.supplier.NewRepairerDiscount","required":["brand","percent"],"properties":{"brand":{"$ref":"#/components/schemas/std.string.String"},"percent":{"$ref":"#/components/schemas/f64"}}},"onboarding.supplier.SubmitRequest":{"description":"Public submit shape — no admin-only / resolved fields. `supply_types`\nis derived server-side from the distinct supply types in\n`authorised_makes`, so the form doesn't double up.","type":"object","title":"onboarding.supplier.SubmitRequest","required":["address","authorised_makes","billing_address","billing_contact_email","billing_contact_name","billing_contact_phone","business_phone","cc_emails","country","delivery_lead_times","delivery_postcodes","display_company_name","general_team","inventory_system_name","management_team","new_repairer_discount_terms","new_repairer_discounts","notifications_emails","order_cutoff_time","registered_company_name","returns_policy","tax_number"],"properties":{"address":{"$ref":"#/components/schemas/onboarding.Address"},"authorised_makes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.supplier.input.SupplyMakeAuthorisation"}},"billing_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/onboarding.Address"}]},"billing_contact_email":{"$ref":"#/components/schemas/std.string.String"},"billing_contact_name":{"$ref":"#/components/schemas/std.string.String"},"billing_contact_phone":{"$ref":"#/components/schemas/std.string.String"},"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"cc_emails":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"country":{"$ref":"#/components/schemas/std.string.String"},"delivery_lead_times":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"delivery_postcodes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"display_company_name":{"$ref":"#/components/schemas/std.string.String"},"general_team":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.TeamMember"}},"inventory_system_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"management_team":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.TeamMember"}},"new_repairer_discount_terms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"new_repairer_discounts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/onboarding.supplier.NewRepairerDiscount"}},"notifications_emails":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"order_cutoff_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"registered_company_name":{"$ref":"#/components/schemas/std.string.String"},"returns_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"tax_number":{"$ref":"#/components/schemas/std.string.String"}}},"onboarding.supplier.input.SupplyMakeAuthorisation":{"description":"One supply type paired with the makes the supplier is authorised\nfor under that type. Restructured from the v1 flat list per CS\nfeedback (one supply type → many makes; suppliers commonly carry\n20+ makes under a single type).","type":"object","title":"onboarding.supplier.input.SupplyMakeAuthorisation","required":["make_ids","supply_type"],"properties":{"make_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"supply_type":{"$ref":"#/components/schemas/onboarding.supplier.input.SupplyType"}}},"onboarding.supplier.input.SupplyType":{"oneOf":[{"const":"oem_genuine"},{"const":"oem_new"},{"const":"used"},{"const":"aftermarket"},{"const":"parallel_import"},{"const":"oes"}]},"openbase.BrandSummary":{"type":"object","title":"openbase.BrandSummary","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"openbase.GapcAlias":{"type":"object","title":"openbase.GapcAlias","required":["alias","match_type"],"properties":{"alias":{"$ref":"#/components/schemas/std.string.String"},"match_type":{"$ref":"#/components/schemas/std.string.String"}}},"openbase.GapcAttribute":{"type":"object","title":"openbase.GapcAttribute","required":["attribute_type","description","name","options","preference_differentiator"],"properties":{"attribute_type":{"$ref":"#/components/schemas/std.string.String"},"description":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"},"options":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"preference_differentiator":{"$ref":"#/components/schemas/std.string.String"}}},"openbase.GapcPartTypeDetails":{"type":"object","title":"openbase.GapcPartTypeDetails","required":["construction","difference","function_purpose","succinct"],"properties":{"construction":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"difference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"function_purpose":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"succinct":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"openbase.GapcPartTypeTranslation":{"type":"object","title":"openbase.GapcPartTypeTranslation","required":["language","translation"],"properties":{"language":{"$ref":"#/components/schemas/std.string.String"},"translation":{"$ref":"#/components/schemas/std.string.String"}}},"openbase.GapcRelatedPartType":{"type":"object","title":"openbase.GapcRelatedPartType","required":["description","id","related_part_type_description","related_part_type_id","related_part_type_name","relation"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"related_part_type_description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"related_part_type_id":{"$ref":"#/components/schemas/std.string.String"},"related_part_type_name":{"$ref":"#/components/schemas/std.string.String"},"relation":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/openbase.RelationEnum"}]}}},"openbase.OpenbaseError":{"oneOf":[{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"$ref":"#/components/schemas/std.string.String"}}}]},"openbase.OpenbaseGetBrandRequest":{"type":"object","title":"openbase.OpenbaseGetBrandRequest","required":["brand_id"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"}}},"openbase.OpenbaseGetBrandResponse":{"type":"object","title":"openbase.OpenbaseGetBrandResponse","required":["aliases","child_brands","description","is_manufacturer","is_oem","is_oes","is_whitelabel","line_name","name","parent_id","parent_name"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/openbase.GapcAlias"}},"child_brands":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/openbase.BrandSummary"}},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"is_manufacturer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oem":{"$ref":"#/components/schemas/bool"},"is_oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_whitelabel":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"line_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"parent_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parent_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"openbase.OpenbaseGetPartTypeDataRequest":{"type":"object","title":"openbase.OpenbaseGetPartTypeDataRequest","required":["part_type_id"],"properties":{"part_type_id":{"$ref":"#/components/schemas/std.string.String"}}},"openbase.OpenbaseGetPartTypeDataResponse":{"type":"object","title":"openbase.OpenbaseGetPartTypeDataResponse","required":["aliases","attributes","details","ebay_uk_id","ebay_us_id","relations","translations"],"properties":{"aliases":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/openbase.GapcAlias"}},"attributes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/openbase.GapcAttribute"}},"details":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/openbase.GapcPartTypeDetails"}]},"ebay_uk_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"ebay_us_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"relations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/openbase.GapcRelatedPartType"}},"translations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/openbase.GapcPartTypeTranslation"}}}},"openbase.OpenbaseGetVehicleDataRequest":{"type":"object","title":"openbase.OpenbaseGetVehicleDataRequest","required":["vehicle_definition_id"],"properties":{"vehicle_definition_id":{"$ref":"#/components/schemas/std.string.String"}}},"openbase.OpenbaseGetVehicleDataResponse":{"type":"object","title":"openbase.OpenbaseGetVehicleDataResponse","required":["mappings"],"properties":{"mappings":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/openbase.VehicleMapping"}}}},"openbase.RelationEnum":{"oneOf":[{"const":"identical_to"},{"const":"similar_to"},{"const":"mistaken_for"},{"const":"type_of"},{"const":"must_contain"},{"const":"may_contain"},{"const":"must_not_contain"},{"const":"contained_by"},{"const":"interfaces_with"},{"const":"pcdb"},{"type":"object","title":"unexpected","required":["unexpected"],"properties":{"unexpected":{"$ref":"#/components/schemas/i16"}}}]},"openbase.VehicleMapping":{"type":"object","title":"openbase.VehicleMapping","required":["data_standard","external_id"],"properties":{"data_standard":{"$ref":"#/components/schemas/std.string.String"},"external_id":{"$ref":"#/components/schemas/std.string.String"}}},"order.AccuracyAssessment":{"oneOf":[{"const":"correct"},{"const":"incorrect_part"},{"const":"incorrect_quantity"},{"const":"missing_item"},{"type":"object","title":"other","required":["other"],"properties":{"other":{"$ref":"#/components/schemas/std.string.String"}}}]},"order.BuyerOrderData":{"allOf":[{"$ref":"#/components/schemas/order.CommonOrderData"},{"type":"object","title":"order.BuyerOrderData","properties":{}}]},"order.CommonOrderData":{"type":"object","title":"order.CommonOrderData","required":["buyer_business_id","buyer_organization_id","created_at","id","items","status","status_history","supplier_business_id","supplier_organization_id","updated_at"],"properties":{"billing_address":{"description":"If applicable it defines where to address invoices","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/Address"}]},"buyer_business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"buyer_contact":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.OrderBuyerDetails"}]},"buyer_organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"created_at":{"description":"Time when the order was created","type":"string","format":"date-time"},"deliver_after":{"description":"If known the date when the items should be delivered to a buyer\nIf time of a date does not matter, a buyer can specify 23:59:59,\nwhich would mean deliver the next day after the one specified","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"deliver_before":{"description":"If known the latest date when the items should be delivered\nIf time of a date does not matter, a buyer can specify 00:00:00,\nwhich would mean deliver the day before specified","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"description":"Id of an order at Partly system","$ref":"#/components/schemas/uuid.Uuid"},"images":{"description":"A list of images relating to the job","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"item_modifications":{"description":"Item modifications tracked for this order (if any)","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.OrderItemModification"}}]},"items":{"description":"Items included in the order","type":"array","items":{"$ref":"#/components/schemas/order.SupplierOrderItem"}},"job_id":{"description":"The job ID associated with this order, if any","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"metadata":{"description":"Associated metadata with the order","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"purchase_currency_code":{"description":"Defines the currency all of the prices are in","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"read_at":{"description":"Time when the order was marked as read for store users\ni.e. it does not allow to track who read it, but only when it was read\nThis allows PIM to show what orders have not been read by store users","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"shipping_address":{"description":"If applicable it defines where to deliver the order","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/Address"}]},"shipping_instructions":{"description":"Free text notes to the delivery company by the buyer","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"description":"The current status of the order","$ref":"#/components/schemas/lookup.SupplierOrderStatus"},"status_history":{"description":"Status history","type":"array","items":{"$ref":"#/components/schemas/lookup.OrderStatusHistoryEventEnriched"}},"supplier_business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"supplier_contact":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.OrderSupplierDetails"}]},"supplier_organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"total_purchase_price":{"description":"If known the total purchase price for all items, discounts and negotiations included","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_shipping_price":{"description":"If known the total shipping price for all items","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"updated_at":{"description":"Time when the order was last updated","type":"string","format":"date-time"},"vehicle_context":{"description":"Zero or more vehicles related to an order","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.VehicleInstanceInfo"}}]}}},"order.ConditionAssessment":{"oneOf":[{"const":"as_described"},{"const":"damaged"},{"const":"grading_dispute"}]},"order.EstimatedDeliveryInfo":{"type":"object","title":"order.EstimatedDeliveryInfo","required":["earliest","latest","window_days"],"properties":{"earliest":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"latest":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"window_days":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]}}},"order.ItemFeedbackEntry":{"description":"Item-level feedback entry from history","type":"object","title":"order.ItemFeedbackEntry","required":["feedback_items","shipment_id","submitted_at","submitted_by"],"properties":{"feedback_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.OrderFeedbackItem"}},"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"submitted_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/order.OrderSubjectEntity"}}},"order.ItemsSummaryInfo":{"type":"object","title":"order.ItemsSummaryInfo","required":["distinct_items","total_quantity"],"properties":{"distinct_items":{"$ref":"#/components/schemas/i32"},"total_quantity":{"$ref":"#/components/schemas/i32"}}},"order.NonCancellableShipment":{"type":"object","title":"order.NonCancellableShipment","required":["id","status"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/std.string.String"}}},"order.OrderBuyerBusiness":{"type":"object","title":"order.OrderBuyerBusiness","properties":{"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrderBuyerDetails":{"type":"object","title":"order.OrderBuyerDetails","required":["user"],"properties":{"business":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.OrderBuyerBusiness"}]},"user":{"$ref":"#/components/schemas/order.OrderBuyerUser"}}},"order.OrderBuyerUser":{"type":"object","title":"order.OrderBuyerUser","required":["name","user_id"],"properties":{"email":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"order.OrderCancelData":{"type":"object","title":"order.OrderCancelData","properties":{"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrderConfirmData":{"type":"object","title":"order.OrderConfirmData","properties":{"acknowledged_inventory_state":{"description":"the inventory state user has acknowledged - unfulfillable sellables will be allowed for this state.\nIf not provided (e.g., from integration server), inventory state validation is skipped.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"deliver_before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"items":{"description":"If required any updates to the order before confirmation","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.OrderItemOnConfirm"}}]},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_shipping_price":{"description":"If known the total shipping price for all items","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrderFeedbackItem":{"type":"object","title":"order.OrderFeedbackItem","required":["accuracy_assessment","condition_assessment","order_item_identity"],"properties":{"accuracy_assessment":{"$ref":"#/components/schemas/order.AccuracyAssessment"},"condition_assessment":{"$ref":"#/components/schemas/order.ConditionAssessment"},"estimated_repair_hours":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"image_urls":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_item_identity":{"$ref":"#/components/schemas/std.string.String"},"timeliness_assessment":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.TimelinessAssessment"}]}}},"order.OrderInsertBuyerData":{"allOf":[{"$ref":"#/components/schemas/order.OrderInsertCommonData"},{"type":"object","title":"order.OrderInsertBuyerData","required":["items"],"properties":{"items":{"description":"Items included in the order","type":"array","items":{"$ref":"#/components/schemas/order.OrderItemOnBuyerInsert"}},"note":{"description":"A note from the repairer to the supplier","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"order.OrderInsertCommonData":{"type":"object","title":"order.OrderInsertCommonData","required":["billing_address","purchase_currency_code","shipping_address"],"properties":{"billing_address":{"description":"If applicable it defines where to address invoices","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/Address"}]},"deliver_after":{"description":"If known the date when the items should be delivered to a buyer\nIf time of a date does not matter, a buyer can specify 23:59:59,\nwhich would mean deliver the next day after the one specified","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"deliver_before":{"description":"If known the latest date when the items should be delivered\nIf time of a date does not matter, a buyer can specify 00:00:00,\nwhich would mean deliver the day before specified","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"images":{"description":"A list of images relating to the job","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"job_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"metadata":{"description":"Order metadata","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"purchase_currency_code":{"description":"Defines the currency all of the prices are in","$ref":"#/components/schemas/std.string.String"},"shipping_address":{"description":"If applicable it defines where to deliver the order","$ref":"#/components/schemas/Address"},"shipping_instructions":{"description":"Free text notes to the delivery company by the buyer","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_shipping_price":{"description":"If known the total shipping price for all items","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_context":{"description":"Zero or more vehicles related to an order","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.VehicleInstanceInfo"}}]}}},"order.OrderInsertData":{"oneOf":[{"description":"Insert an order for a supplier as a buyer (repairer)","type":"object","title":"buyer","required":["buyer"],"properties":{"buyer":{"$ref":"#/components/schemas/order.OrderInsertBuyerData"}}},{"description":"Insert an order for authenticated supplier on behalf of a buyer (repairer)","type":"object","title":"supplier","required":["supplier"],"properties":{"supplier":{"$ref":"#/components/schemas/order.OrderInsertSupplierData"}}}]},"order.OrderInsertSupplierData":{"allOf":[{"$ref":"#/components/schemas/order.OrderInsertCommonData"},{"type":"object","title":"order.OrderInsertSupplierData","required":["buyer","items","status","total_purchase_price"],"properties":{"buyer":{"description":"The customer (buyer) contact details","$ref":"#/components/schemas/lookup.OrderBuyerContact"},"items":{"description":"Items included in the order","type":"array","items":{"$ref":"#/components/schemas/order.OrderItemOnBuyerInsert"}},"status":{"description":"The initial status of the order","$ref":"#/components/schemas/lookup.SupplierOrderStatus"},"supplier_reference":{"description":"A reference given for the order by the supplier. Cannot exceed 100 characters.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_purchase_price":{"description":"The total purchase price of all items in the order","$ref":"#/components/schemas/std.string.String"}}}]},"order.OrderItemBuyerProcess":{"oneOf":[{"description":"The item has been received by the buyer","type":"object","title":"received","required":["received"],"properties":{"received":{"description":"The item has been received by the buyer","type":"object","title":"received","required":["notes","timestamp"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"timestamp":{"description":"The time that the item was received","type":"string","format":"date-time"}}}}},{"description":"The item has been accepted by the buyer (is the right part\nand in the right condition)","type":"object","title":"accepted","required":["accepted"],"properties":{"accepted":{"description":"The item has been accepted by the buyer (is the right part\nand in the right condition)","type":"object","title":"accepted","required":["notes"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"description":"The buyer has requested to return the item","type":"object","title":"return_requested","required":["return_requested"],"properties":{"return_requested":{"description":"The buyer has requested to return the item","type":"object","title":"return_requested","required":["notes","quantity","reason"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"$ref":"#/components/schemas/u32"},"reason":{"$ref":"#/components/schemas/lookup.OrderItemReturnReason"}}}}},{"description":"The buyer is providing feedback on the item received","type":"object","title":"provide_feedback","required":["provide_feedback"],"properties":{"provide_feedback":{"description":"The buyer is providing feedback on the item received","type":"object","title":"provide_feedback","required":["accuracy","condition","image_urls","notes","timeliness"],"properties":{"accuracy":{"$ref":"#/components/schemas/order.AccuracyAssessment"},"condition":{"$ref":"#/components/schemas/order.ConditionAssessment"},"image_urls":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"timeliness":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.TimelinessAssessment"}]}}}}}]},"order.OrderItemInfo":{"type":"object","title":"order.OrderItemInfo","required":["currency_code","identity","part_info","purchase_price","quantity","sellable_id"],"properties":{"currency_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"identity":{"$ref":"#/components/schemas/std.string.String"},"part_info":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.PartInfo"}]},"purchase_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/f64"}]},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"sellable_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"order.OrderItemModification":{"description":"Represents a single item modification event","type":"object","title":"order.OrderItemModification","required":["id","occurred_at"],"properties":{"actor_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"actor_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"changes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.OrderItemChange"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"occurred_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"order.OrderItemOnBuyerInsert":{"type":"object","title":"order.OrderItemOnBuyerInsert","required":["buyable","identity","purchase_price","quantity"],"properties":{"buyable":{"$ref":"#/components/schemas/lookup.OrderItemBuyable"},"condition":{"description":"The condition of the item being ordered","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.ProductCondition"}]},"identity":{"description":"Identity of an item included in an order","$ref":"#/components/schemas/std.string.String"},"images":{"description":"A list of relative images for the part","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"job_part_id":{"description":"The job part id","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"original_part":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartIdentityContext"}]},"part_selection_contexts":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.PartSelectionContext"}}]},"purchase_price":{"description":"If known, item specific purchase price","$ref":"#/components/schemas/std.string.String"},"quantity":{"description":"Quantity ordered","$ref":"#/components/schemas/u32"},"retail_price":{"description":"If known, item specific retail price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"return_policy":{"description":"Repairer server will use this return policy to allow order line item status' to be moved to Returned if needed","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.ReturnPolicy"}]},"shipping_price":{"description":"If known, item specific shipping price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"description":"If known, item specific trade price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrderItemOnConfirm":{"oneOf":[{"type":"object","title":"update","required":["update"],"properties":{"update":{"$ref":"#/components/schemas/order.OrderItemOnConfirmUpdate"}}},{"type":"object","title":"remove","required":["remove"],"properties":{"remove":{"$ref":"#/components/schemas/std.string.String"}}}]},"order.OrderItemOnConfirmUpdate":{"type":"object","title":"order.OrderItemOnConfirmUpdate","required":["identity"],"properties":{"buyable":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderItemBuyable"}]},"identity":{"$ref":"#/components/schemas/std.string.String"},"original_part":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartIdentityContext"}]},"part_selection_contexts":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.PartSelectionContext"}}]},"purchase_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrderItemProcess":{"oneOf":[{"description":"Actions that can be performed by a repairer","type":"object","title":"buyer","required":["buyer"],"properties":{"buyer":{"$ref":"#/components/schemas/order.OrderItemBuyerProcess"}}},{"type":"object","title":"supplier","required":["supplier"],"properties":{"supplier":{"$ref":"#/components/schemas/order.OrderItemSupplierProcess"}}}]},"order.OrderItemProcessData":{"type":"object","title":"order.OrderItemProcessData","required":["data","identity"],"properties":{"data":{"$ref":"#/components/schemas/order.OrderItemProcess"},"identity":{"$ref":"#/components/schemas/std.string.String"}}},"order.OrderItemSupplierProcess":{"oneOf":[{"type":"object","title":"return_accepted","required":["return_accepted"],"properties":{"return_accepted":{"type":"object","title":"return_accepted","required":["notes"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"return_rejected","required":["return_rejected"],"properties":{"return_rejected":{"type":"object","title":"return_rejected","required":["notes","reason"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"reason":{"$ref":"#/components/schemas/lookup.OrderItemReturnRejectedReason"}}}}},{"description":"The item has been returned to the supplier and needs to be marked as returned.","type":"object","title":"supplier_return","required":["supplier_return"],"properties":{"supplier_return":{"description":"The item has been returned to the supplier and needs to be marked as returned.","type":"object","title":"supplier_return","required":["notes","quantity","reason"],"properties":{"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"$ref":"#/components/schemas/u32"},"reason":{"$ref":"#/components/schemas/lookup.OrderItemReturnReason"}}}}}]},"order.OrderItemsProcessData":{"type":"object","title":"order.OrderItemsProcessData","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.OrderItemProcessData"}}}},"order.OrderSubjectEntity":{"oneOf":[{"type":"object","title":"user","required":["user"],"properties":{"user":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"integration","required":["integration"],"properties":{"integration":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"order.OrderSupplierAsignee":{"oneOf":[{"type":"object","title":"user","required":["user"],"properties":{"user":{"type":"object","title":"user","required":["email","id","name"],"properties":{"email":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"order.OrderSupplierBusiness":{"type":"object","title":"order.OrderSupplierBusiness","properties":{"business_phone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrderSupplierDetails":{"type":"object","title":"order.OrderSupplierDetails","required":["organization"],"properties":{"business":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.OrderSupplierBusiness"}]},"organization":{"$ref":"#/components/schemas/order.OrderSupplierOrganization"}}},"order.OrderSupplierOrganization":{"type":"object","title":"order.OrderSupplierOrganization","required":["name","org_id","organization_id"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"org_id":{"deprecated":true,"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"order.OrderUpdateData":{"oneOf":[{"description":"Update an order for a supplier as a supplier","type":"object","title":"supplier","required":["supplier"],"properties":{"supplier":{"$ref":"#/components/schemas/order.OrderUpdateSupplierData"}}}]},"order.OrderUpdateSupplierData":{"type":"object","title":"order.OrderUpdateSupplierData","properties":{"assigned_to":{"description":"An optional list of user ids that are assigned to the order","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"deliver_before":{"description":"If known the latest date when the items should be delivered\nIf time of a date does not matter, a buyer can specify 00:00:00,\nwhich would mean deliver the day before specified","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"status":{"description":"Status can be marked from confirmed -> dispatched\nTo remove dispatched status, status can be marked from dispatched -> confirmed\nOther statuses are not managed through this endpoint","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.OrderStatusOnUpdate"}]},"supplier_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_shipping_price":{"description":"If known the total shipping price for all items","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrdersCancelError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_order_status","required":["invalid_order_status"],"properties":{"invalid_order_status":{"type":"object","title":"invalid_order_status","required":["actual","expected"],"properties":{"actual":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expected":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"shipments_received","required":["shipments_received"],"properties":{"shipments_received":{"type":"object","title":"shipments_received","required":["shipments"],"properties":{"shipments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.NonCancellableShipment"}}}}}},{"const":"buyer_organization_not_found"}]},"order.OrdersConfirmError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_order_status","required":["invalid_order_status"],"properties":{"invalid_order_status":{"type":"object","title":"invalid_order_status","required":["actual","expected"],"properties":{"actual":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expected":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"inventory_not_found","required":["inventory_not_found"],"properties":{"inventory_not_found":{"type":"object","title":"inventory_not_found","required":["sellable_id","store_address_id","store_id"],"properties":{"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"sellable_not_found","required":["sellable_not_found"],"properties":{"sellable_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"cannot_claim_inventory","required":["cannot_claim_inventory"],"properties":{"cannot_claim_inventory":{"$ref":"#/components/schemas/std.string.String"}}}]},"order.OrdersGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"order.OrdersGetResponse":{"allOf":[{"$ref":"#/components/schemas/order.SupplierOrder"},{"type":"object","title":"order.OrdersGetResponse","properties":{}}]},"order.OrdersInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"duplicate","required":["duplicate"],"properties":{"duplicate":{"type":"object","title":"duplicate","required":["external_id","id"],"properties":{"external_id":{"$ref":"#/components/schemas/std.string.String"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"invalid_currency_code","required":["invalid_currency_code"],"properties":{"invalid_currency_code":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"empty_currency_code"},{"description":"The buyer organization has no configured currency. The backend\ncannot accept an order without knowing the unit of account.","type":"object","title":"buyer_org_currency_not_configured","required":["buyer_org_currency_not_configured"],"properties":{"buyer_org_currency_not_configured":{"description":"The buyer organization has no configured currency. The backend\ncannot accept an order without knowing the unit of account.","type":"object","title":"buyer_org_currency_not_configured","required":["buyer_org_id"],"properties":{"buyer_org_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"description":"The order currency does not match the buyer organization's\nconfigured currency.","type":"object","title":"currency_mismatch","required":["currency_mismatch"],"properties":{"currency_mismatch":{"description":"The order currency does not match the buyer organization's\nconfigured currency.","type":"object","title":"currency_mismatch","required":["actual","expected"],"properties":{"actual":{"$ref":"#/components/schemas/std.string.String"},"expected":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"duplicate_item","required":["duplicate_item"],"properties":{"duplicate_item":{"type":"object","title":"duplicate_item","required":["identity","sellable_id"],"properties":{"identity":{"$ref":"#/components/schemas/std.string.String"},"sellable_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}}}},{"type":"object","title":"sellable_not_found","required":["sellable_not_found"],"properties":{"sellable_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"invalid_order_status","required":["invalid_order_status"],"properties":{"invalid_order_status":{"type":"object","title":"invalid_order_status","required":["actual","expected"],"properties":{"actual":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expected":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"store_not_found","required":["store_not_found"],"properties":{"store_not_found":{"$ref":"#/components/schemas/std.string.String"}}}]},"order.OrdersInventoryVerifyError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_order_status","required":["invalid_order_status"],"properties":{"invalid_order_status":{"type":"object","title":"invalid_order_status","required":["actual","expected"],"properties":{"actual":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expected":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"order.OrdersInventoryVerifyRequest":{"type":"object","title":"order.OrdersInventoryVerifyRequest","required":["order_id"],"properties":{"order_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"order.OrdersInventoryVerifyResponse":{"type":"object","title":"order.OrdersInventoryVerifyResponse","required":["inventory_state","unfulfillable_items"],"properties":{"inventory_state":{"description":"Hash of the inventory state this verification request was performed on.\nUsed later to confirm an order even with insufficient stock if the user approves.","$ref":"#/components/schemas/std.string.String"},"unfulfillable_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.UnfulfillableSellable"}}}},"order.OrdersItemsProcessError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"invalid_order_status","required":["invalid_order_status"],"properties":{"invalid_order_status":{"type":"object","title":"invalid_order_status","required":["actual","expected"],"properties":{"actual":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expected":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"order_item_not_found","required":["order_item_not_found"],"properties":{"order_item_not_found":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"invalid_order_item_status","required":["invalid_order_item_status"],"properties":{"invalid_order_item_status":{"type":"object","title":"invalid_order_item_status","required":["actual","expected"],"properties":{"actual":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expected":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"invalid_order_item_return_quantity","required":["invalid_order_item_return_quantity"],"properties":{"invalid_order_item_return_quantity":{"type":"object","title":"invalid_order_item_return_quantity","required":["available","given"],"properties":{"available":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"given":{"$ref":"#/components/schemas/u32"}}}}},{"const":"invalid_feedback_item"},{"const":"buyer_organization_not_found"},{"type":"object","title":"invalid_order_state","required":["invalid_order_state"],"properties":{"invalid_order_state":{"$ref":"#/components/schemas/std.string.String"}}}]},"order.OrdersListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"not_found"}]},"order.OrdersMutationResponse":{"allOf":[{"$ref":"#/components/schemas/order.SupplierOrder"},{"type":"object","title":"order.OrdersMutationResponse","properties":{}}]},"order.OrdersOrderedCountError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"order.OrdersRepairerInsertRequestData":{"type":"object","title":"order.OrdersRepairerInsertRequestData","required":["data","store_id"],"properties":{"data":{"$ref":"#/components/schemas/order.OrderInsertBuyerData"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"order.OrdersSearchPageRequest":{"type":"object","title":"order.OrdersSearchPageRequest","properties":{"cursor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"order_by":{"$ref":"#/components/schemas/lookup.SupplierOrderSearchOrderedBy"}}},"order.OrdersSearchRequest":{"type":"object","title":"order.OrdersSearchRequest","required":["page"],"properties":{"deliver_after":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"deliver_before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"job_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"keyword":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"page":{"$ref":"#/components/schemas/order.OrdersSearchPageRequest"},"status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SupplierOrderStatusKind"}]}}},"order.OrdersSearchResponse":{"type":"object","title":"order.OrdersSearchResponse","required":["page"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.SupplierOrder"}},"page":{"$ref":"#/components/schemas/ForwardPagination"}}},"order.OrdersShipmentFeedbackGetResponse":{"description":"Response containing all feedback history for a specific shipment","type":"object","title":"order.OrdersShipmentFeedbackGetResponse","required":["shipment_id"],"properties":{"item_feedback":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.ItemFeedbackEntry"}},"shipment_feedback":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.ShipmentFeedbackEntry"}},"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"order.OrdersShipmentFeedbackInsertRequest":{"description":"Submit feedback for an entire shipment","type":"object","title":"order.OrdersShipmentFeedbackInsertRequest","required":["packaging_condition_assessment","shipment_id","timeliness_assessment"],"properties":{"image_urls":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"packaging_condition_assessment":{"$ref":"#/components/schemas/order.PackagingConditionAssessment"},"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"timeliness_assessment":{"$ref":"#/components/schemas/order.TimelinessAssessment"}}},"order.OrdersShipmentGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"order.OrdersShipmentGetResponse":{"type":"object","title":"order.OrdersShipmentGetResponse","required":["items","order","shipment"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.ShipmentItemDetails"}},"order":{"$ref":"#/components/schemas/order.ShipmentOrderDetails"},"shipment":{"$ref":"#/components/schemas/order.ShipmentDetails"}}},"order.OrdersShipmentInsertRequest":{"description":"Create a shipment for an order with selected items","type":"object","title":"order.OrdersShipmentInsertRequest","required":["order_id","shipment_items"],"properties":{"external_tracking_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"shipment_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.ShipmentItemRequest"}},"shipped_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"order.OrdersShipmentInsertResponse":{"type":"object","title":"order.OrdersShipmentInsertResponse","required":["created_at","external_tracking_id","order_id","shipment_id"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"external_tracking_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"order.OrdersShipmentListRequest":{"description":"List shipments with pagination and filtering","type":"object","title":"order.OrdersShipmentListRequest","properties":{"direction":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"order_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"page":{"$ref":"#/components/schemas/order.ShipmentListPageRequest"},"query":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"repairer_site_query":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"supplier_query":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.OrdersShipmentListResponse":{"type":"object","title":"order.OrdersShipmentListResponse","required":["page","shipments"],"properties":{"page":{"$ref":"#/components/schemas/ForwardPagination"},"shipments":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.ShipmentListItem"}},"total":{"description":"Total count provided on first page request","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}},"order.OrdersUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"type":"object","title":"user_not_found","required":["user_not_found"],"properties":{"user_not_found":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"const":"user_forbidden"},{"type":"object","title":"invalid_order_status","required":["invalid_order_status"],"properties":{"invalid_order_status":{"type":"object","title":"invalid_order_status","required":["actual","expected"],"properties":{"actual":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"expected":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"order.PackagingConditionAssessment":{"oneOf":[{"const":"good"},{"const":"minor_damage"},{"const":"severe_damage"}]},"order.PartInfo":{"type":"object","title":"order.PartInfo","required":["description","manufacturer","name","part_number"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"manufacturer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.ShipmentDetails":{"type":"object","title":"order.ShipmentDetails","required":["created_at","direction","estimated_delivery","external_tracking_id","id","metadata","order_id","receiver_org_id","sender_org_id","status","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"direction":{"$ref":"#/components/schemas/std.string.String"},"estimated_delivery":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.EstimatedDeliveryInfo"}]},"external_tracking_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"$ref":"#/components/schemas/serde_json.Value"},"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"receiver_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sender_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/order.ShipmentStatus"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"order.ShipmentFeedbackEntry":{"description":"Shipment-level feedback entry from history","type":"object","title":"order.ShipmentFeedbackEntry","required":["packaging_condition_assessment","shipment_id","submitted_at","submitted_by","timeliness_assessment"],"properties":{"image_urls":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"packaging_condition_assessment":{"$ref":"#/components/schemas/order.PackagingConditionAssessment"},"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"submitted_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"submitted_by":{"$ref":"#/components/schemas/order.OrderSubjectEntity"},"timeliness_assessment":{"$ref":"#/components/schemas/order.TimelinessAssessment"}}},"order.ShipmentItemDetails":{"type":"object","title":"order.ShipmentItemDetails","required":["order_item","order_item_identity","quantity"],"properties":{"order_item":{"$ref":"#/components/schemas/order.OrderItemInfo"},"order_item_identity":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/i32"}}},"order.ShipmentItemRequest":{"type":"object","title":"order.ShipmentItemRequest","required":["order_item_identity","quantity"],"properties":{"order_item_identity":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/i32"}}},"order.ShipmentListItem":{"type":"object","title":"order.ShipmentListItem","required":["created_at","direction","estimated_delivery","external_tracking_id","id","items_summary","order","order_id","status","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"direction":{"$ref":"#/components/schemas/std.string.String"},"estimated_delivery":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.EstimatedDeliveryInfo"}]},"external_tracking_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"items_summary":{"$ref":"#/components/schemas/order.ItemsSummaryInfo"},"order":{"$ref":"#/components/schemas/order.ShipmentListOrderInfo"},"order_id":{"$ref":"#/components/schemas/uuid.Uuid"},"receiver":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.ShipmentParty"}]},"sender":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.ShipmentParty"}]},"status":{"$ref":"#/components/schemas/order.ShipmentStatus"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"order.ShipmentListOrderInfo":{"type":"object","title":"order.ShipmentListOrderInfo","required":["external_id","id","status","store_id"],"properties":{"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"repairer_site_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"repairer_site_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"$ref":"#/components/schemas/std.string.String"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_rego":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.ShipmentListPageRequest":{"type":"object","title":"order.ShipmentListPageRequest","properties":{"cursor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"order.ShipmentOrderDetails":{"type":"object","title":"order.ShipmentOrderDetails","required":["buyer_contact","created_at","external_id","id","job_id","purchase_currency_code","shipping_address","status","store_id","supplier_contact"],"properties":{"buyer_contact":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.OrderBuyerDetails"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"external_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"purchase_currency_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_address":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"status":{"$ref":"#/components/schemas/std.string.String"},"store_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_contact":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/order.OrderSupplierDetails"}]},"vehicle_context":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]}}},"order.ShipmentParty":{"description":"Represents a party (sender or receiver) in a shipment list context.","type":"object","title":"order.ShipmentParty","required":["org_id"],"properties":{"org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"org_name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.ShipmentStatus":{"oneOf":[{"const":"pending"},{"const":"dispatched"},{"const":"in_transit"},{"const":"delivered"},{"const":"lost"},{"const":"cancelled"}]},"order.SupplierOrder":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/order.CommonOrderData"},{"type":"object","title":"order.SupplierOrderData","properties":{"assigned_to":{"description":"An optional list of supply users that are assigned to the order","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.OrderSupplierAsignee"}}]},"supplier_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"description":"tag object","type":"object","title":"tag","required":["type"],"properties":{"type":{"const":"supplier"}}}]},{"allOf":[{"$ref":"#/components/schemas/order.CommonOrderData"},{"type":"object","title":"order.BuyerOrderData","properties":{}},{"description":"tag object","type":"object","title":"tag","required":["type"],"properties":{"type":{"const":"buyer"}}}]}]},"order.SupplierOrderData":{"allOf":[{"$ref":"#/components/schemas/order.CommonOrderData"},{"type":"object","title":"order.SupplierOrderData","properties":{"assigned_to":{"description":"An optional list of supply users that are assigned to the order","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/order.OrderSupplierAsignee"}}]},"supplier_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"order.SupplierOrderItem":{"type":"object","title":"order.SupplierOrderItem","required":["buyable","identity","images","status"],"properties":{"buyable":{"description":"The item being purchased","$ref":"#/components/schemas/lookup.OrderItemBuyable"},"condition":{"description":"The condition of the line item if known","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.ProductCondition"}]},"identity":{"description":"Identity of an item included in an order","$ref":"#/components/schemas/std.string.String"},"images":{"description":"A list of relative images for the part","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"job_part_id":{"description":"The job part id","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"original_part":{"description":"The original part that was selected by the buyer when placing the order","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.GapcPartIdentityContext"}]},"part_selection_contexts":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/lookup.PartSelectionContext"}}]},"purchase_price":{"description":"If known, item specific purchase price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"quantity":{"description":"Quantity ordered","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"retail_price":{"description":"If known, item specific retail price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"return_policy":{"description":"Repairer server will use this return policy to allow order line item status' to be moved to Returned if needed","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.ReturnPolicy"}]},"shipping_price":{"description":"If known, item specific shipping price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"snapshot":{"description":"Contains info about gapc part and sellable","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SupplierOrderItemSnapshot"}]},"status":{"description":"Order line item status, if relevant","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/lookup.SupplierOrderItemStatus"}]},"trade_price":{"description":"If known, item specific trade price","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"order.TimelinessAssessment":{"oneOf":[{"const":"too_early"},{"const":"early"},{"const":"on_time"},{"const":"late"}]},"order.UnfulfillableSellable":{"type":"object","title":"order.UnfulfillableSellable","required":["buyable_id","name","sellable_id","store_address_id"],"properties":{"buyable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"parts_verification.BuildsheetMatch":{"oneOf":[{"type":"object","title":"direct","required":["match_type"],"properties":{"match_type":{"const":"direct"}}},{"description":"The job MPN is superseded by `epc_mpn` in the EPC; the part is still correct.\nSet by a HITL reviewer when the job used an older superseded part number.","type":"object","title":"supersession","required":["epc_mpn","match_type"],"properties":{"epc_mpn":{"$ref":"#/components/schemas/parts_verification.GapcIdentity"},"match_type":{"const":"supersession"}}},{"description":"The part is one of several interchangeable variants on the build sheet.\n`part_identities` lists the *other* MPNs in the same variant group,\neach enriched with the assemblies they appear on.","type":"object","title":"variant","required":["match_type","part_identities"],"properties":{"match_type":{"const":"variant"},"part_identities":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/parts_verification.EnrichedGapcIdentity"}}}}]},"parts_verification.EnrichedGapcIdentity":{"type":"object","title":"parts_verification.EnrichedGapcIdentity","required":["assembly_ids","gapc_brand_id","normalized","original"],"properties":{"assembly_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"gapc_brand_id":{"$ref":"#/components/schemas/std.string.String"},"normalized":{"$ref":"#/components/schemas/std.string.String"},"original":{"description":"The original MPN as supplied by the caller (or the normalized MPN\nfor identities sourced from the build sheet).","$ref":"#/components/schemas/std.string.String"}}},"parts_verification.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"const":"assemblies_not_ready"}]},"parts_verification.GapcIdentity":{"type":"object","title":"parts_verification.GapcIdentity","required":["gapc_brand_id","mpn"],"properties":{"gapc_brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"parts_verification.MatchResult":{"oneOf":[{"type":"object","title":"unknown","required":["type"],"properties":{"type":{"const":"unknown"}}},{"description":"A human-in-the-loop reviewer rejected this match. **Only HITL produces\nthis** — automated matching should always use [`MatchResult::Unknown`]\ninstead, never `Denied`.","type":"object","title":"denied","required":["alternative_mpn","type"],"properties":{"alternative_mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/parts_verification.GapcIdentity"}]},"type":{"const":"denied"}}},{"description":"The part is not something that you would find in an EPC, or is not\napplicable to this vehicle. The `reason` field distinguishes between\nconsumables and genuinely inapplicable parts. Legacy persisted\nrecords without a `reason` field deserialize as\n[`NotApplicableReason::Missing`] via `#[serde(default)]`.","type":"object","title":"not_applicable","required":["reason","type"],"properties":{"reason":{"$ref":"#/components/schemas/parts_verification.NotApplicableReason"},"type":{"const":"not_applicable"}}},{"oneOf":[{"type":"object","title":"direct","required":["match_type","type"],"properties":{"match_type":{"const":"direct"},"type":{"const":"buildsheet_match"}}},{"description":"The job MPN is superseded by `epc_mpn` in the EPC; the part is still correct.\nSet by a HITL reviewer when the job used an older superseded part number.","type":"object","title":"supersession","required":["epc_mpn","match_type","type"],"properties":{"epc_mpn":{"$ref":"#/components/schemas/parts_verification.GapcIdentity"},"match_type":{"const":"supersession"},"type":{"const":"buildsheet_match"}}},{"description":"The part is one of several interchangeable variants on the build sheet.\n`part_identities` lists the *other* MPNs in the same variant group,\neach enriched with the assemblies they appear on.","type":"object","title":"variant","required":["match_type","part_identities","type"],"properties":{"match_type":{"const":"variant"},"part_identities":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/parts_verification.EnrichedGapcIdentity"}},"type":{"const":"buildsheet_match"}}}]},{"description":"The part itself isn't on the build sheet, but supersedes (forward or\nreverse) to one or more parts that are. Each [`SupersessionMatch`]\ncarries a superseding identity and how that identity maps onto the\nbuild sheet.","type":"object","title":"supersession","required":["items","type"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/parts_verification.SupersessionMatch"}},"type":{"const":"supersession"}}}]},"parts_verification.NotApplicableReason":{"oneOf":[{"const":"consumable","description":"The part is a fluid, consumable, or accessory — not something found in an EPC."},{"const":"missing","description":"The part is genuinely not applicable to this vehicle. Also the\ncatch-all default for callers that don't distinguish a more specific\nreason and for legacy records that predate the `reason` field."}]},"parts_verification.PartVerification":{"type":"object","title":"parts_verification.PartVerification","required":["gapc_id","result"],"properties":{"gapc_id":{"$ref":"#/components/schemas/parts_verification.EnrichedGapcIdentity"},"result":{"$ref":"#/components/schemas/parts_verification.MatchResult"}}},"parts_verification.SupersessionMatch":{"description":"A single resolved supersession: the superseding part identity (enriched with\nthe assemblies it appears on), and how it in turn maps onto the build sheet.","type":"object","title":"parts_verification.SupersessionMatch","required":["matches","part_identity"],"properties":{"matches":{"description":"How the superseding part maps onto the build sheet.","$ref":"#/components/schemas/parts_verification.BuildsheetMatch"},"part_identity":{"description":"The part that was matched as a supersession.","$ref":"#/components/schemas/parts_verification.EnrichedGapcIdentity"}}},"procurement.Actor":{"oneOf":[{"type":"object","title":"user","required":["side","type","user_id"],"properties":{"side":{"$ref":"#/components/schemas/procurement.ActorSide"},"type":{"const":"user"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"integration","required":["integration_id","type"],"properties":{"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"integration"}}},{"type":"object","title":"system","required":["type"],"properties":{"type":{"const":"system"}}}]},"procurement.ActorSide":{"oneOf":[{"const":"buyer"},{"const":"supplier"}]},"procurement.AddPartReason":{"oneOf":[{"type":"object","title":"required","required":["type"],"properties":{"type":{"const":"required"}}},{"type":"object","title":"suggested","required":["type"],"properties":{"type":{"const":"suggested"}}},{"description":"Other reason with a text description.","type":"object","title":"other","required":["description","type"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"other"}}}]},"procurement.Address":{"description":"An address (buyer's delivery address or supplier's warehouse).","type":"object","title":"procurement.Address","required":["city","country_code","postcode","state","street_name","street_number","suburb","unit"],"properties":{"city":{"description":"City.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"country_code":{"description":"Country, represented as ISO 3166 alpha-2 (e.g., \"NZ\", \"GB\").","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"postcode":{"description":"Postcode or ZIP code.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"state":{"description":"State or province.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"street_name":{"description":"Street name (may be abbreviated).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"street_number":{"description":"Street number (may be non-numeric).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"suburb":{"description":"Suburb or district.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"unit":{"description":"Unit or apartment number.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.Assembly":{"oneOf":[{"description":"A hotspot diagram assembly.","type":"object","title":"hotspot_diagram","required":["diagram_code","diagram_name","diagram_pnc","diagram_url","hotspots","id","type"],"properties":{"diagram_code":{"description":"The diagram code.","$ref":"#/components/schemas/std.string.String"},"diagram_name":{"description":"The diagram name.","$ref":"#/components/schemas/std.string.String"},"diagram_pnc":{"description":"The diagram PNC.","$ref":"#/components/schemas/std.string.String"},"diagram_url":{"description":"URL to the diagram image.","$ref":"#/components/schemas/std.string.String"},"hotspots":{"description":"Hotspot coordinates within the assembly diagram.","$ref":"#/components/schemas/procurement.AssemblyHotspots"},"id":{"description":"The unique ID of the assembly diagram.","$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"hotspot_diagram"}}}]},"procurement.AssemblyHotspots":{"description":"Hotspot coordinates within an assembly diagram.","type":"object","title":"procurement.AssemblyHotspots","required":["x1_px","x2_px","y1_px","y2_px"],"properties":{"x1_px":{"description":"Left edge X coordinate in pixels.","$ref":"#/components/schemas/i64"},"x2_px":{"description":"Right edge X coordinate in pixels.","$ref":"#/components/schemas/i64"},"y1_px":{"description":"Top edge Y coordinate in pixels.","$ref":"#/components/schemas/i64"},"y2_px":{"description":"Bottom edge Y coordinate in pixels.","$ref":"#/components/schemas/i64"}}},"procurement.AssigneesInsertedSnapshot":{"type":"object","title":"procurement.AssigneesInsertedSnapshot","required":["user_ids"],"properties":{"user_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"procurement.AssigneesRemovedSnapshot":{"type":"object","title":"procurement.AssigneesRemovedSnapshot","required":["user_ids"],"properties":{"user_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"procurement.Business":{"oneOf":[{"description":"A buyer's repairer site (the shipping destination).","type":"object","title":"buyer_site","required":["id","name","phone_number","type"],"properties":{"id":{"description":"The unique identifier of the business.","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"The business's display name.","$ref":"#/components/schemas/std.string.String"},"phone_number":{"description":"The site's contact phone number, if set.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"buyer_site"}}},{"description":"A buyer's repairer business (the parent of a buyer site).","type":"object","title":"buyer_business","required":["id","name","type"],"properties":{"id":{"description":"The unique identifier of the business.","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"The business's display name.","$ref":"#/components/schemas/std.string.String"},"type":{"const":"buyer_business"}}},{"description":"A supplier business.","type":"object","title":"supplier_business","required":["id","name","phone_number","type"],"properties":{"id":{"description":"The unique identifier of the business.","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"The business's display name.","$ref":"#/components/schemas/std.string.String"},"phone_number":{"description":"The business's contact phone number, if set.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"supplier_business"}}}]},"procurement.Claim":{"description":"A full claim aggregate as returned by the claim APIs.","type":"object","title":"procurement.Claim","required":["attachments","created_at","description","id","initiator","items","kind","procurement_id","status","updated_at"],"properties":{"attachments":{"description":"Evidence or credit-note files attached to this claim.","type":"array","items":{"$ref":"#/components/schemas/procurement.ClaimAttachment"}},"created_at":{"description":"When the claim was created.","type":"string","format":"date-time"},"description":{"description":"Optional note supplied when the claim was created.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"description":"Claim ID.","$ref":"#/components/schemas/uuid.Uuid"},"initiator":{"description":"Side that raised the claim.","$ref":"#/components/schemas/procurement.ClaimInitiator"},"items":{"description":"Returned or adjusted items in this claim.","type":"array","items":{"$ref":"#/components/schemas/procurement.ClaimItem"}},"kind":{"description":"Claim category.","$ref":"#/components/schemas/procurement.ClaimKind"},"procurement_id":{"description":"Procurement the claim belongs to.","$ref":"#/components/schemas/uuid.Uuid"},"status":{"description":"Current claim status.","$ref":"#/components/schemas/procurement.ClaimStatus"},"updated_at":{"description":"When the claim was last updated.","type":"string","format":"date-time"}}},"procurement.ClaimAttachment":{"description":"File metadata attached to a procurement claim.\n\nBytes live in object storage at `storage_key`; this API returns the\naddressable metadata only. A future private download endpoint should mint\nshort-lived URLs using the same authorization boundary as the parent claim.","type":"object","title":"procurement.ClaimAttachment","required":["claim_id","created_at","filename","id","mime_type","position","size_bytes","storage_key"],"properties":{"claim_id":{"description":"Claim this attachment belongs to.","$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"When the attachment metadata was recorded.","type":"string","format":"date-time"},"filename":{"description":"Display filename.","$ref":"#/components/schemas/std.string.String"},"id":{"description":"Attachment ID.","$ref":"#/components/schemas/uuid.Uuid"},"mime_type":{"description":"MIME type supplied when the file was attached.","$ref":"#/components/schemas/std.string.String"},"position":{"description":"Display order within the claim.","$ref":"#/components/schemas/i32"},"size_bytes":{"description":"File size in bytes.","$ref":"#/components/schemas/i64"},"storage_key":{"description":"Opaque object-storage key.","$ref":"#/components/schemas/std.string.String"}}},"procurement.ClaimCreatedItem":{"description":"Returned quantity on one offered item in a `claim_created` event.","type":"object","title":"procurement.ClaimCreatedItem","required":["claim_item_id","offered_item_id","quantity_returned"],"properties":{"claim_item_id":{"description":"Created claim item ID.","$ref":"#/components/schemas/uuid.Uuid"},"offered_item_id":{"description":"Offered item being returned or adjusted. A bundle line when\n`sellable_id` is set; otherwise the returned product or assembly.","$ref":"#/components/schemas/uuid.Uuid"},"quantity_returned":{"description":"Quantity of the offered item returned.","$ref":"#/components/schemas/u32"},"sellable_id":{"description":"Child sellable within `offered_item_id` for a bundle sub-return. `None`\nwhen the whole offered item is returned.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"procurement.ClaimCreatedPayload":{"description":"Event payload emitted when a return claim is created.","type":"object","title":"procurement.ClaimCreatedPayload","required":["attachment_ids","claim_id","initiator","items","kind","status"],"properties":{"attachment_ids":{"description":"Attachment IDs attached when the claim was created.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"claim_id":{"description":"Created claim ID.","$ref":"#/components/schemas/uuid.Uuid"},"initiator":{"description":"Side that raised the claim.","$ref":"#/components/schemas/procurement.ClaimInitiator"},"items":{"description":"Returned or adjusted items included in the claim.","type":"array","items":{"$ref":"#/components/schemas/procurement.ClaimCreatedItem"}},"kind":{"description":"Claim category.","$ref":"#/components/schemas/procurement.ClaimKind"},"status":{"description":"Status assigned to the claim when it was created.","$ref":"#/components/schemas/procurement.ClaimStatus"}}},"procurement.ClaimInitiator":{"oneOf":[{"const":"supplier"},{"const":"buyer"}]},"procurement.ClaimItem":{"description":"A full claim line item.","type":"object","title":"procurement.ClaimItem","required":["claim_id","created_at","id","offered_item_id","quantity_returned"],"properties":{"claim_id":{"description":"Claim this line item belongs to.","$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"When the claim item was created.","type":"string","format":"date-time"},"id":{"description":"Claim item ID.","$ref":"#/components/schemas/uuid.Uuid"},"offered_item_id":{"description":"Offered item being returned or adjusted. A bundle line when\n`sellable_id` is set; otherwise the returned product or assembly.","$ref":"#/components/schemas/uuid.Uuid"},"quantity_returned":{"description":"Quantity of the offered item returned.","$ref":"#/components/schemas/u32"},"sellable_id":{"description":"Child sellable within `offered_item_id` for a bundle sub-return. `None`\nwhen the whole offered item is returned.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"procurement.ClaimItemSummary":{"description":"Summary of a claim line item, side-loaded in procurement responses.","type":"object","title":"procurement.ClaimItemSummary","required":["claim_id","created_at","id","offered_item_id","quantity_returned"],"properties":{"claim_id":{"description":"Claim this line item belongs to.","$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"When the claim item was created.","type":"string","format":"date-time"},"id":{"description":"Claim item ID.","$ref":"#/components/schemas/uuid.Uuid"},"offered_item_id":{"description":"Offered item being returned or adjusted. A bundle line when\n`sellable_id` is set; otherwise the returned product or assembly.","$ref":"#/components/schemas/uuid.Uuid"},"quantity_returned":{"description":"Quantity of the offered item returned.","$ref":"#/components/schemas/u32"},"sellable_id":{"description":"Child sellable within `offered_item_id` for a bundle sub-return. `None`\nwhen the whole offered item is returned.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"procurement.ClaimKind":{"oneOf":[{"const":"return","description":"Returned offered items."}]},"procurement.ClaimStatus":{"oneOf":[{"const":"draft","description":"Saved but not submitted."},{"const":"submitted","description":"Submitted and awaiting response from the other party."},{"const":"accepted","description":"The return or adjustment has been accepted."},{"const":"rejected","description":"The responding party rejected the return or adjustment."},{"const":"countered","description":"The responding party proposed a different resolution."},{"const":"applied","description":"The credit note has been received or the invoice has been adjusted."},{"const":"withdrawn","description":"The initiating party withdrew the claim."},{"const":"voided","description":"The system invalidated the claim."}]},"procurement.ClaimSummary":{"description":"Summary of a claim on a procurement response.","type":"object","title":"procurement.ClaimSummary","required":["created_at","description","id","initiator","kind","status","updated_at"],"properties":{"created_at":{"description":"When the claim was created.","type":"string","format":"date-time"},"description":{"description":"Optional note supplied when the claim was created.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"description":"Claim ID.","$ref":"#/components/schemas/uuid.Uuid"},"initiator":{"description":"Side that raised the claim.","$ref":"#/components/schemas/procurement.ClaimInitiator"},"kind":{"description":"Claim category.","$ref":"#/components/schemas/procurement.ClaimKind"},"status":{"description":"Current claim status.","$ref":"#/components/schemas/procurement.ClaimStatus"},"updated_at":{"description":"When the claim was last updated.","type":"string","format":"date-time"}}},"procurement.CorrectedPartReason":{"oneOf":[{"type":"object","title":"incorrect_variant","required":["type"],"properties":{"type":{"const":"incorrect_variant"}}},{"type":"object","title":"incorrect_part_or_quantity","required":["type"],"properties":{"type":{"const":"incorrect_part_or_quantity"}}},{"type":"object","title":"supersession","required":["type"],"properties":{"type":{"const":"supersession"}}},{"description":"Other reason with a text description.","type":"object","title":"other","required":["description","type"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"other"}}}]},"procurement.DateRange":{"oneOf":[{"type":"object","title":"before","required":["date","type"],"properties":{"date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"type":{"const":"before"}}},{"type":"object","title":"after","required":["date","type"],"properties":{"date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"type":{"const":"after"}}},{"type":"object","title":"between","required":["after","before","type"],"properties":{"after":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"before":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"type":{"const":"between"}}}]},"procurement.DeliveryDateUpdatedSnapshot":{"type":"object","title":"procurement.DeliveryDateUpdatedSnapshot","required":["after","before"],"properties":{"after":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"procurement.DeliveryDeadline":{"oneOf":[{"description":"The buyer needs the parts as soon as possible.","type":"object","title":"asap","required":["type","value"],"properties":{"type":{"const":"asap"},"value":{"description":"The buyer needs the parts as soon as possible.","type":"object","title":"asap","properties":{}}}},{"description":"The buyer needs the parts delivered after a specific date.","type":"object","title":"after","required":["type","value"],"properties":{"type":{"const":"after"},"value":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}}]},"procurement.EventIdentity":{"description":"Identifies an event within a procurement.","type":"object","title":"procurement.EventIdentity","required":["event_id","procurement_id"],"properties":{"event_id":{"$ref":"#/components/schemas/uuid.Uuid"},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.EventType":{"oneOf":[{"const":"procurement_inserted"},{"const":"status_updated"},{"const":"procurement_closed"},{"const":"source_items_inserted"},{"const":"source_items_updated"},{"const":"source_items_removed"},{"const":"offered_items_inserted"},{"const":"offered_items_updated"},{"const":"offered_items_removed"},{"const":"delivery_date_updated"},{"const":"total_trade_price_updated"},{"const":"total_shipping_price_updated"},{"const":"total_shipping_price_removed"},{"const":"supplier_reference_updated"},{"const":"supplier_metadata_updated"},{"const":"request_snapshot_reference_inserted"},{"const":"supply_snapshot_reference_inserted"},{"const":"supply_snapshot_reference_updated"},{"const":"user_viewed"},{"const":"note_inserted"},{"const":"note_updated"},{"const":"note_removed"},{"const":"assignees_inserted"},{"const":"assignees_removed"},{"const":"shipment_inserted"},{"const":"shipment_status_updated"},{"const":"stock_updated"},{"const":"files_updated"},{"const":"claim_created"}]},"procurement.File":{"oneOf":[{"type":"object","title":"image","required":["created_at","side","type","url"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"side":{"$ref":"#/components/schemas/procurement.ActorSide"},"type":{"const":"image"},"url":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.FileInput":{"oneOf":[{"type":"object","title":"image","required":["type","url"],"properties":{"type":{"const":"image"},"url":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.FilesUpdated":{"description":"Side-view payload for a procurement-scope `FilesUpdated` event.","type":"object","title":"procurement.FilesUpdated","required":["inserted","removed"],"properties":{"inserted":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"removed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}}}},"procurement.HideablePartIdentity":{"description":"Part identity where the MPN may be hidden from the viewer.\n\nUsed on the repairer (buyer) side where the supplier's MPN is\nnot revealed until the order is requested, unless the supplier\ncorrected the part or when 'show_unencrypted_parts' entitlement is present.","type":"object","title":"procurement.HideablePartIdentity","required":["gapc_brand_id","mpn"],"properties":{"gapc_brand_id":{"description":"The GAPC brand identifier (always visible).","$ref":"#/components/schemas/std.string.String"},"mpn":{"description":"The manufacturer part number — may be hidden from the viewer.","oneOf":[{"const":"hidden","description":"The value is hidden from the current viewer."},{"description":"The value is visible.","type":"object","title":"value<std.string.String>","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/std.string.String"}}}]}}},"procurement.Identity":{"oneOf":[{"type":"object","title":"id","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"procurement.InitiatorFilter":{"oneOf":[{"description":"Match buyer-initiated procurements. When `user_ids` is present\nand non-empty, only procurements whose initiator is one of those\nusers match; otherwise any procurement initiated by a known\nbuyer user matches.","type":"object","title":"buyer","required":["type"],"properties":{"type":{"const":"buyer"},"user_ids":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]}}},{"description":"Match integration-initiated procurements. When `integration_ids`\nis present and non-empty, only procurements whose initiator is\none of those integrations match; otherwise any\nintegration-initiated procurement matches.","type":"object","title":"integration","required":["type"],"properties":{"integration_ids":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"type":{"const":"integration"}}}]},"procurement.JobSource":{"oneOf":[{"const":"bodyshop"},{"const":"workshop"}]},"procurement.LeadTime":{"oneOf":[{"description":"An absolute delivery date/time.","type":"object","title":"absolute","required":["date","type"],"properties":{"date":{"description":"The exact date/time the item will be delivered.","type":"string","format":"date-time"},"type":{"const":"absolute"}}},{"description":"A number of business days. A `count` of 0 is same-day delivery.","type":"object","title":"days","required":["count","type"],"properties":{"by_time":{"description":"Wall-clock time of day the item will be delivered by. `None` leaves\nthe arrival time to the shipping policy's default.\n\nZone-less by design: the shipping-policy ETA resolves it against the\njob's business clock, so a supplier quoting from another timezone is\nread in the buyer's. Revisit once businesses carry a real timezone\n(see `commerce_rules::current_time`).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"count":{"description":"Number of business days.","$ref":"#/components/schemas/u32"},"type":{"const":"days"}}},{"description":"A delivery window between two dates.","type":"object","title":"range","required":["from","to","type"],"properties":{"from":{"description":"Earliest delivery date.","type":"string","format":"date-time"},"to":{"description":"Latest delivery date.","type":"string","format":"date-time"},"type":{"const":"range"}}}]},"procurement.NoteIdentity":{"description":"Identifies a note within a procurement.","type":"object","title":"procurement.NoteIdentity","required":["note_id","procurement_id"],"properties":{"note_id":{"$ref":"#/components/schemas/uuid.Uuid"},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.NoteInputError":{"oneOf":[{"type":"object","title":"empty_content","required":["type"],"properties":{"type":{"const":"empty_content"}}}]},"procurement.NoteInsertedSnapshot":{"type":"object","title":"procurement.NoteInsertedSnapshot","required":["author_id","note_id","snapshot","target"],"properties":{"author_id":{"description":"The user who added the note (the event actor); `None` for\nintegration/system actors. `default` so events/outbox rows written before\nthis field deserialize (the author renders as absent).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"note_id":{"$ref":"#/components/schemas/uuid.Uuid"},"snapshot":{"$ref":"#/components/schemas/procurement.NoteSnapshot"},"target":{"description":"Where the note attaches. `default` (procurement) so events/outbox rows\nwritten before this field still deserialize.","$ref":"#/components/schemas/procurement.NoteTarget"}}},"procurement.NoteRemovedSnapshot":{"type":"object","title":"procurement.NoteRemovedSnapshot","required":["author_id","note_id","snapshot"],"properties":{"author_id":{"description":"The user who removed the note (the event actor); `None` for\nintegration/system actors. `default` for backward-compatible deserialize.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"note_id":{"$ref":"#/components/schemas/uuid.Uuid"},"snapshot":{"$ref":"#/components/schemas/procurement.NoteSnapshot"}}},"procurement.NoteSnapshot":{"type":"object","title":"procurement.NoteSnapshot","required":["content","visibility"],"properties":{"content":{"$ref":"#/components/schemas/std.string.String"},"visibility":{"$ref":"#/components/schemas/procurement.NoteVisibility"}}},"procurement.NoteTarget":{"oneOf":[{"type":"object","title":"procurement","required":["kind"],"properties":{"kind":{"const":"procurement"}}},{"type":"object","title":"source_item","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"source_item"}}},{"type":"object","title":"offered_item","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"offered_item"}}},{"type":"object","title":"event","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"event"}}}]},"procurement.NoteUpdatedSnapshot":{"type":"object","title":"procurement.NoteUpdatedSnapshot","required":["after","author_id","before","note_id"],"properties":{"after":{"$ref":"#/components/schemas/procurement.NoteSnapshot"},"author_id":{"description":"The user who edited the note (the event actor); `None` for\nintegration/system actors. `default` for backward-compatible deserialize.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"before":{"$ref":"#/components/schemas/procurement.NoteSnapshot"},"note_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.NoteVisibility":{"oneOf":[{"const":"all"},{"const":"buyer"},{"const":"supplier"}]},"procurement.OfferField":{"oneOf":[{"const":"part_identity"},{"const":"lead_time"},{"const":"quantity"},{"const":"inventory","description":"The whole inventory reference is absent."},{"const":"inventory_sellable_id","description":"Inventory is present but its `sellable_id` is unset."},{"const":"inventory_sku","description":"Inventory is present but its `sku` is unset."}]},"procurement.OfferType":{"oneOf":[{"const":"product"},{"const":"assembly"},{"const":"assembly_item"},{"const":"bundle"},{"const":"bundle_product"},{"const":"bundle_assembly"}]},"procurement.OfferedItemClaims":{"description":"Claim references attached to an offered item.","type":"object","title":"procurement.OfferedItemClaims","properties":{"claim_item_ids":{"description":"All claim item IDs for this offered item.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"in_flight_claim_item_ids":{"description":"Claim item IDs whose parent claim is still in active resolution.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"procurement.Organization":{"description":"A resolved organisation.","type":"object","title":"procurement.Organization","required":["id","name"],"properties":{"id":{"description":"The unique identifier of the organisation.","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"The organisation's display name.","$ref":"#/components/schemas/std.string.String"}}},"procurement.PartCondition":{"oneOf":[{"description":"This part is new.","type":"object","title":"new","required":["payload","type"],"properties":{"payload":{"description":"This part is new.","type":"object","title":"new","properties":{}},"type":{"const":"new"}}},{"description":"This part is used, with a condition grade.","type":"object","title":"used","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.PartUsedConditionGrade"},"type":{"const":"used"}}}]},"procurement.PartIdentity":{"description":"The identity of a part (MPN + brand). Both fields are required as a pair —\nuse null on the wrapping field to express absence; there is no\nhalf-populated state.","type":"object","title":"procurement.PartIdentity","required":["gapc_brand_id","mpn"],"properties":{"gapc_brand_id":{"description":"The GAPC brand identifier.","$ref":"#/components/schemas/std.string.String"},"mpn":{"description":"The manufacturer part number.","$ref":"#/components/schemas/std.string.String"}}},"procurement.PartUsedConditionGrade":{"oneOf":[{"description":"Panel grade (0-C scale).","type":"object","title":"panel","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.PartUsedConditionPanelGrade"},"type":{"const":"panel"}}},{"description":"Age measured by distance traveled (km or miles).","type":"object","title":"distance_traveled","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/u32"},"type":{"const":"distance_traveled"}}},{"description":"Age measured by operation hours.","type":"object","title":"operation_hours","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/u32"},"type":{"const":"operation_hours"}}},{"description":"Age measured by remaining thickness (mm).","type":"object","title":"remaining_thickness","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/f64"},"type":{"const":"remaining_thickness"}}}]},"procurement.PartUsedConditionPanelGrade":{"oneOf":[{"const":"grade0","description":"Grade 0: like new."},{"const":"grade_a","description":"Grade A: damage less than credit card size."},{"const":"grade_b","description":"Grade B: damage less than two credit cards."},{"const":"grade_c","description":"Grade C: damage larger than two credit cards."}]},"procurement.ProcurementCloseIntent":{"oneOf":[{"const":"cancelled"},{"const":"declined"}]},"procurement.ProcurementClosedSnapshot":{"description":"Emitted alongside the `StatusUpdated` diff when a close endpoint runs.\nAbsent on translated procurements, which have no close action to read an\nintent from — treat absence as \"intent unknown\", never as \"not closed\".","type":"object","title":"procurement.ProcurementClosedSnapshot","required":["intent"],"properties":{"intent":{"$ref":"#/components/schemas/procurement.ProcurementCloseIntent"}}},"procurement.ProcurementInitiator":{"oneOf":[{"description":"Initiated by an integration.","type":"object","title":"integration","required":["integration_id","type"],"properties":{"integration_id":{"description":"The integration ID.","$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"integration"}}},{"description":"Initiated by a user (buyer).","type":"object","title":"buyer","required":["type","user_id"],"properties":{"type":{"const":"buyer"},"user_id":{"description":"The user ID, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}}]},"procurement.ProcurementSearchOrderedBy":{"oneOf":[{"const":"created_at_desc"},{"const":"created_at_asc"},{"const":"deliver_after_asc"},{"const":"deliver_after_desc"}]},"procurement.ProcurementStatus":{"oneOf":[{"const":"offers_requested"},{"const":"offers_sent"},{"const":"order_requested"},{"const":"order_confirmed"},{"const":"off_network"},{"const":"closed"}]},"procurement.Rationale":{"oneOf":[{"const":"buyer_selected","description":"The buyer explicitly selected this supplier."},{"const":"matching_stock","description":"The supplier had matching stock."}]},"procurement.RemovePartReason":{"oneOf":[{"type":"object","title":"discontinued","required":["type"],"properties":{"type":{"const":"discontinued"}}},{"type":"object","title":"out_of_stock","required":["type"],"properties":{"type":{"const":"out_of_stock"}}},{"type":"object","title":"not_required","required":["type"],"properties":{"type":{"const":"not_required"}}},{"description":"Other reason with a text description.","type":"object","title":"other","required":["description","type"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"other"}}}]},"procurement.RequestSnapshotReferenceInsertedSnapshot":{"type":"object","title":"procurement.RequestSnapshotReferenceInsertedSnapshot","required":["after"],"properties":{"after":{"$ref":"#/components/schemas/procurement.SupplySnapshotReference"}}},"procurement.RequiredPricing":{"oneOf":[{"const":"missing","description":"The price has not been provided yet and needs to be filled in."},{"description":"The price value.","type":"object","title":"value","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.RestockingFee":{"oneOf":[{"description":"A fixed monetary amount (e.g., $25.00).","type":"object","title":"absolute","required":["amount","type"],"properties":{"amount":{"description":"The fixed fee amount.","$ref":"#/components/schemas/std.string.String"},"type":{"const":"absolute"}}},{"description":"A percentage of the item price (e.g., 15 = 15%).","type":"object","title":"percentage","required":["max_amount","percent","type"],"properties":{"max_amount":{"description":"Optional maximum fee amount (cap).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"percent":{"description":"The fee in percent (e.g., 15 means 15%; decimals such as 7.5 are allowed).","$ref":"#/components/schemas/std.string.String"},"type":{"const":"percentage"}}},{"description":"A fixed amount plus a percentage of the item price (e.g., $10.00 + 5%).","type":"object","title":"absolute_and_percentage","required":["flat_amount","max_amount","percent","type"],"properties":{"flat_amount":{"description":"The fixed portion of the fee.","$ref":"#/components/schemas/std.string.String"},"max_amount":{"description":"Optional maximum fee amount (cap).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"percent":{"description":"The percentage portion in percent (e.g., 15 means 15%; decimals such as 7.5 are allowed).","$ref":"#/components/schemas/std.string.String"},"type":{"const":"absolute_and_percentage"}}}]},"procurement.ReturnPolicy":{"oneOf":[{"type":"object","title":"no_returns","required":["type"],"properties":{"type":{"const":"no_returns"}}},{"description":"Returns accepted within a time window.","type":"object","title":"returnable","required":["claim_window","min_return_price","restocking_fee","return_shipping","return_window","type"],"properties":{"claim_window":{"description":"The window within which a return claim must be submitted.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnWindow"}]},"min_return_price":{"description":"Minimum item price eligible for return.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"restocking_fee":{"description":"Restocking fee, if any.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.RestockingFee"}]},"return_shipping":{"description":"Return shipping terms, if specified.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnShipping"}]},"return_window":{"description":"The window within which the item must be physically returned.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnWindow"}]},"type":{"const":"returnable"}}},{"description":"Returns accepted with custom/non-standard terms described in text.","type":"object","title":"custom","required":["description","type"],"properties":{"description":{"description":"Free-text description of the return policy.","$ref":"#/components/schemas/std.string.String"},"type":{"const":"custom"}}}]},"procurement.ReturnShipping":{"description":"Return shipping terms.","type":"object","title":"procurement.ReturnShipping","required":["paid_by"],"properties":{"paid_by":{"description":"Who pays for return shipping.","$ref":"#/components/schemas/procurement.ReturnShippingCostResponsibility"}}},"procurement.ReturnShippingCostResponsibility":{"oneOf":[{"const":"buyer","description":"The buyer pays return shipping."},{"const":"supplier","description":"The supplier/seller pays return shipping."}]},"procurement.ReturnWindow":{"oneOf":[{"description":"A number of days from the delivery date.","type":"object","title":"days","required":["count","type"],"properties":{"count":{"description":"Number of days within which the item can be returned.","$ref":"#/components/schemas/u16"},"type":{"const":"days"}}},{"description":"An absolute deadline for returns.","type":"object","title":"absolute","required":["date","type"],"properties":{"date":{"description":"The date/time by which the item must be returned.","type":"string","format":"date-time"},"type":{"const":"absolute"}}}]},"procurement.SearchPageRequest":{"description":"Pagination parameters for search endpoints.","type":"object","title":"procurement.SearchPageRequest","properties":{"cursor":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"order_by":{"$ref":"#/components/schemas/procurement.ProcurementSearchOrderedBy"}}},"procurement.Shipment":{"description":"A shipment as surfaced by the search/list APIs. The sender/receiver\norganisations and shipping price are resolved from the parent procurement\n(via the `procurements` and `organizations` entities maps), not duplicated\nhere.","type":"object","title":"procurement.Shipment","required":["created_at","direction","external_tracking_id","id","procurement_id","status","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"direction":{"$ref":"#/components/schemas/procurement.ShipmentDirection"},"external_tracking_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/procurement.ShipmentStatus"},"total_quantity":{"description":"Sum of `quantity` across the shipment's `shipment_items`. Absent when\nthe responding endpoint didn't load item totals","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"procurement.ShipmentDirection":{"oneOf":[{"const":"to_buyer"},{"const":"to_supplier"},{"const":"intra_supplier"}]},"procurement.ShipmentInsertedSnapshot":{"description":"Recorded when a shipment is created: its identity, parties, direction, and\ninitial status.","type":"object","title":"procurement.ShipmentInsertedSnapshot","required":["direction","receiver_org_id","sender_org_id","shipment_id","status"],"properties":{"direction":{"$ref":"#/components/schemas/procurement.ShipmentDirection"},"receiver_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sender_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/procurement.ShipmentStatus"}}},"procurement.ShipmentItem":{"description":"A single line item on a shipment","type":"object","title":"procurement.ShipmentItem","required":["created_at","id","offered_item_id","quantity"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"$ref":"#/components/schemas/i32"}}},"procurement.ShipmentStatus":{"oneOf":[{"const":"pending"},{"const":"dispatched"},{"const":"in_transit"},{"const":"delivered"},{"const":"lost"},{"const":"cancelled"}]},"procurement.ShipmentStatusUpdatedSnapshot":{"type":"object","title":"procurement.ShipmentStatusUpdatedSnapshot","required":["after","before","shipment_id"],"properties":{"after":{"$ref":"#/components/schemas/procurement.ShipmentStatus"},"before":{"$ref":"#/components/schemas/procurement.ShipmentStatus"},"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.ShippingPrice":{"oneOf":[{"description":"The total shipping cost is derived from each item's shipping_price * quantity.","type":"object","title":"derived","required":["type","value"],"properties":{"type":{"const":"derived"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"The supplier provided a total shipping cost for the entire procurement.","type":"object","title":"absolute","required":["type","value"],"properties":{"type":{"const":"absolute"},"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.StatusUpdatedSnapshot":{"type":"object","title":"procurement.StatusUpdatedSnapshot","required":["after","before"],"properties":{"after":{"$ref":"#/components/schemas/procurement.ProcurementStatus"},"before":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}},"procurement.StockUpdatedDelta":{"description":"Stock delta for a single sellable within a [`StockUpdatedPayload`].\n\nSelf-contained: carries the store address the moved stock sits at so the\nstock outbox can be written straight from the event, without re-walking the\noffered items to resolve it.\n\n`quantity_delta` is signed:\n- **negative** — stock consumed (item added to order)\n- **positive** — stock freed (item removed or order cancelled)","type":"object","title":"procurement.StockUpdatedDelta","required":["quantity_delta","sellable_id","store_address_id"],"properties":{"quantity_delta":{"$ref":"#/components/schemas/i32"},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"store_address_id":{"description":"Inventory location (store address) the sellable's stock sits at. `None`\nwhen the offered item carried no stock location — the stock can't be\napplied, so the outbox skips it. `#[serde(default)]` lets events written\nbefore this field existed deserialize as `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"procurement.StockUpdatedPayload":{"description":"Payload for a `stock_updated` event.","type":"object","title":"procurement.StockUpdatedPayload","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.StockUpdatedDelta"}}}},"procurement.SupplierMetadataUpdatedSnapshot":{"description":"The supplier's key-value metadata was updated.","type":"object","title":"procurement.SupplierMetadataUpdatedSnapshot","required":["after","before"],"properties":{"after":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"before":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]}}},"procurement.SupplierReferenceUpdatedSnapshot":{"description":"The supplier's own reference (e.g., invoice or quote number) was updated.","type":"object","title":"procurement.SupplierReferenceUpdatedSnapshot","required":["after","before"],"properties":{"after":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"before":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.SupplySnapshotReference":{"type":"object","title":"procurement.SupplySnapshotReference","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/std.string.String"}}},"procurement.SupplySnapshotReferenceInsertedSnapshot":{"type":"object","title":"procurement.SupplySnapshotReferenceInsertedSnapshot","required":["after"],"properties":{"after":{"$ref":"#/components/schemas/procurement.SupplySnapshotReference"}}},"procurement.SupplySnapshotReferenceUpdatedSnapshot":{"type":"object","title":"procurement.SupplySnapshotReferenceUpdatedSnapshot","required":["after","before"],"properties":{"after":{"$ref":"#/components/schemas/procurement.SupplySnapshotReference"},"before":{"$ref":"#/components/schemas/procurement.SupplySnapshotReference"}}},"procurement.TotalShippingPriceRemovedSnapshot":{"type":"object","title":"procurement.TotalShippingPriceRemovedSnapshot","required":["before"],"properties":{"before":{"$ref":"#/components/schemas/procurement.ShippingPrice"}}},"procurement.TotalShippingPriceUpdatedSnapshot":{"description":"`total_shipping_price` being set or transitioning between values; removal\nuses [`TotalShippingPriceRemovedSnapshot`].","type":"object","title":"procurement.TotalShippingPriceUpdatedSnapshot","required":["after","before"],"properties":{"after":{"$ref":"#/components/schemas/procurement.ShippingPrice"},"before":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ShippingPrice"}]}}},"procurement.TotalTradePriceUpdatedSnapshot":{"description":"`total_trade_price` is the sum of `trade_price × quantity` across offered\nitems. Always set, so both sides of the diff are required.","type":"object","title":"procurement.TotalTradePriceUpdatedSnapshot","required":["after","before"],"properties":{"after":{"$ref":"#/components/schemas/std.string.String"},"before":{"$ref":"#/components/schemas/std.string.String"}}},"procurement.User":{"description":"A resolved user who can be assigned to handle a procurement.","type":"object","title":"procurement.User","required":["avatar_url","email","id","name","phone_number"],"properties":{"avatar_url":{"description":"URL to the user's avatar image.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"email":{"description":"The user's email address — `hidden` when withheld from the viewer.","oneOf":[{"description":"Null","type":"null"},{"oneOf":[{"const":"hidden","description":"The value is hidden from the current viewer."},{"description":"The value is visible.","type":"object","title":"value<std.string.String>","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/std.string.String"}}}]}]},"id":{"description":"The user's unique identifier.","$ref":"#/components/schemas/uuid.Uuid"},"name":{"description":"The user's display name.","$ref":"#/components/schemas/std.string.String"},"phone_number":{"description":"The user's phone number.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.Vehicle":{"description":"The vehicle referenced in a procurement.","type":"object","title":"procurement.Vehicle","required":["chassis_number","oem_brand_id","plate_number","plate_state","variant"],"properties":{"chassis_number":{"description":"If known, the VIN or chassis number of the vehicle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oem_brand_id":{"description":"The vehicle's OEM brand as a GAPC brand suid, if it could be resolved.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_number":{"description":"If known, the plate number (rego) of the vehicle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"plate_state":{"description":"If known, the state or region of the plate registration.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"variant":{"description":"The vehicle variant information.","$ref":"#/components/schemas/procurement.VehicleVariant"}}},"procurement.VehicleVariant":{"description":"The specific variant of vehicle for a procurement.","type":"object","title":"procurement.VehicleVariant","required":["description","oem_vehicle_id","uvdb_properties"],"properties":{"description":{"description":"A plain-text description of the vehicle variant.","$ref":"#/components/schemas/std.string.String"},"oem_vehicle_id":{"description":"An OEM vehicle identifier, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"uvdb_properties":{"description":"The UVDB property suids (make, model, etc.) resolved for this variant.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"procurement.buyer.BuyerPart":{"description":"The part that the buyer requested.","type":"object","title":"procurement.buyer.BuyerPart","required":["assembly","description","ghca_id","job_part_id","part_identity","quantity","retail_price"],"properties":{"assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.Assembly"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.buyer.Entities":{"description":"Side-loaded entity data for buyer/repairer API responses.\n\nEach map is keyed by the entity's UUID. Procurement objects reference\nentities by ID; callers look up the full data here.","type":"object","title":"procurement.buyer.Entities","properties":{"businesses":{"description":"Businesses referenced by this response (buyer site, buyer business, supplier).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Business"}},"claim_items":{"description":"Claim item summaries referenced by offered items, keyed by claim item ID.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.ClaimItemSummary"}},"claims":{"description":"Claim summaries referenced by this response, keyed by claim ID.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.ClaimSummary"}},"notes":{"description":"Notes referenced by this response, keyed by note id. Includes notes\nreferenced from `procurement`/`source_item`/`offered_item` `note_ids`,\nand event-targeted notes (e.g. a close note attached to a\n`StatusUpdated` event) resolved via the event's own note id.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.buyer.Note"}},"offered_items":{"description":"Offered items for this procurement (keyed by offered item ID).\nIncludes removed offers under the `removed_items` expand; see\n`procurement.removed_items` for their ids. Removed offers are always\n`Draft`, whatever the procurement's status.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.buyer.OfferedItem"}},"organizations":{"description":"Organisations referenced by this response (buyer, supplier, work provider).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Organization"}},"shipments":{"description":"Shipment summaries referenced by this response, keyed by shipment ID.\nOmitted when there are no shipments.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.buyer.ShipmentSummary"}},"source_items":{"description":"Source items referenced by this response (keyed by source item ID).\nIncludes removed items under the `removed_items` expand; see\n`procurement.removed_items` for their ids.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.buyer.SourceItem"}},"users":{"description":"Users referenced by this response (assignees).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.User"}}}},"procurement.buyer.Event":{"allOf":[{"$ref":"#/components/schemas/procurement.buyer.EventPayload"},{"description":"A procurement event enriched for the buyer-facing API. Combines the stable\nevent metadata (id, actor, correlation, timestamp) with a buyer-filtered\npayload view.","type":"object","title":"procurement.buyer.Event","required":["actor","correlation_id","created_at","id"],"properties":{"actor":{"$ref":"#/components/schemas/procurement.Actor"},"correlation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"Ids of notes attached to this event (resolve via `entities.notes`).\nPopulated only by `events.list`; empty elsewhere.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}]},"procurement.buyer.EventPayload":{"oneOf":[{"type":"object","title":"procurement_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.buyer.ProcurementInserted"},"type":{"const":"procurement_inserted"}}},{"type":"object","title":"status_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.StatusUpdatedSnapshot"},"type":{"const":"status_updated"}}},{"type":"object","title":"procurement_closed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ProcurementClosedSnapshot"},"type":{"const":"procurement_closed"}}},{"type":"object","title":"source_items_inserted","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.buyer.SourceItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.SourceItem"}}}},"type":{"const":"source_items_inserted"}}},{"type":"object","title":"source_items_updated","required":["payload","type"],"properties":{"payload":{"description":"Wraps a list of before/after pairs for `*Updated` payloads.","type":"object","title":"procurement.ItemChangesSnapshot<procurement.buyer.SourceItem>","required":["changes"],"properties":{"changes":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"procurement.ItemChangeSnapshot<procurement.buyer.SourceItem>","required":["after","before","id"],"properties":{"after":{"$ref":"#/components/schemas/procurement.buyer.SourceItem"},"before":{"$ref":"#/components/schemas/procurement.buyer.SourceItem"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}},"type":{"const":"source_items_updated"}}},{"type":"object","title":"source_items_removed","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.buyer.SourceItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.SourceItem"}}}},"type":{"const":"source_items_removed"}}},{"type":"object","title":"offered_items_inserted","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.buyer.draft.OfferedItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.draft.OfferedItem"}}}},"type":{"const":"offered_items_inserted"}}},{"type":"object","title":"offered_items_updated","required":["payload","type"],"properties":{"payload":{"description":"Wraps a list of before/after pairs for `*Updated` payloads.","type":"object","title":"procurement.ItemChangesSnapshot<procurement.buyer.draft.OfferedItem>","required":["changes"],"properties":{"changes":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"procurement.ItemChangeSnapshot<procurement.buyer.draft.OfferedItem>","required":["after","before","id"],"properties":{"after":{"$ref":"#/components/schemas/procurement.buyer.draft.OfferedItem"},"before":{"$ref":"#/components/schemas/procurement.buyer.draft.OfferedItem"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}},"type":{"const":"offered_items_updated"}}},{"type":"object","title":"offered_items_removed","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.buyer.draft.OfferedItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.draft.OfferedItem"}}}},"type":{"const":"offered_items_removed"}}},{"type":"object","title":"delivery_date_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.DeliveryDateUpdatedSnapshot"},"type":{"const":"delivery_date_updated"}}},{"type":"object","title":"total_trade_price_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.TotalTradePriceUpdatedSnapshot"},"type":{"const":"total_trade_price_updated"}}},{"type":"object","title":"total_shipping_price_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.TotalShippingPriceUpdatedSnapshot"},"type":{"const":"total_shipping_price_updated"}}},{"type":"object","title":"total_shipping_price_removed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.TotalShippingPriceRemovedSnapshot"},"type":{"const":"total_shipping_price_removed"}}},{"type":"object","title":"request_snapshot_reference_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.RequestSnapshotReferenceInsertedSnapshot"},"type":{"const":"request_snapshot_reference_inserted"}}},{"type":"object","title":"supply_snapshot_reference_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.SupplySnapshotReferenceInsertedSnapshot"},"type":{"const":"supply_snapshot_reference_inserted"}}},{"type":"object","title":"supply_snapshot_reference_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.SupplySnapshotReferenceUpdatedSnapshot"},"type":{"const":"supply_snapshot_reference_updated"}}},{"type":"object","title":"user_viewed","required":["payload","type"],"properties":{"payload":{"type":"object","title":"user_viewed","properties":{}},"type":{"const":"user_viewed"}}},{"type":"object","title":"note_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.NoteInsertedSnapshot"},"type":{"const":"note_inserted"}}},{"type":"object","title":"note_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.NoteUpdatedSnapshot"},"type":{"const":"note_updated"}}},{"type":"object","title":"note_removed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.NoteRemovedSnapshot"},"type":{"const":"note_removed"}}},{"type":"object","title":"assignees_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.AssigneesInsertedSnapshot"},"type":{"const":"assignees_inserted"}}},{"type":"object","title":"assignees_removed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.AssigneesRemovedSnapshot"},"type":{"const":"assignees_removed"}}},{"type":"object","title":"shipment_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ShipmentInsertedSnapshot"},"type":{"const":"shipment_inserted"}}},{"type":"object","title":"shipment_status_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ShipmentStatusUpdatedSnapshot"},"type":{"const":"shipment_status_updated"}}},{"type":"object","title":"stock_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.StockUpdatedPayload"},"type":{"const":"stock_updated"}}},{"type":"object","title":"files_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.FilesUpdated"},"type":{"const":"files_updated"}}},{"type":"object","title":"claim_created","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ClaimCreatedPayload"},"type":{"const":"claim_created"}}}]},"procurement.buyer.Note":{"description":"A note on a procurement, viewed from the buyer's perspective.","type":"object","title":"procurement.buyer.Note","required":["actor","content","created_at","id","procurement_id","target","updated_at","visibility"],"properties":{"actor":{"$ref":"#/components/schemas/procurement.Actor"},"content":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"},"target":{"description":"What this note is attached to (procurement / source_item / offered_item / event).","$ref":"#/components/schemas/procurement.NoteTarget"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"visibility":{"$ref":"#/components/schemas/procurement.NoteVisibility"}}},"procurement.buyer.OfferedItem":{"oneOf":[{"description":"An offered item in a draft status (buyer view).","type":"object","title":"procurement.buyer.draft.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","item_type","supplied_offer","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"item_type":{"const":"draft"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.buyer.draft.SuppliedOffer"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}},{"description":"An offered item in a submitted status (buyer view).","type":"object","title":"procurement.buyer.submitted.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","item_type","supplied_offer","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"item_type":{"const":"submitted"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.buyer.submitted.SuppliedOffer"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}}]},"procurement.buyer.Procurement":{"allOf":[{"$ref":"#/components/schemas/procurement.buyer.Status"},{"description":"A procurement viewed from the buyer's perspective.\n\nOrganisation and site data is referenced by ID only. Use the\naccompanying [`Entities`] map to resolve full details.","type":"object","title":"procurement.buyer.Procurement","required":["buyer_business_id","buyer_metadata","buyer_organization_id","buyer_reference","buyer_shipping_address","buyer_site_id","created_at","currency_code","files","id","insurer_reference","job_id","job_source","latest_edition","reference","shipment_ids","source_item_ids","supplier_business_id","supplier_organization_id","total_loss_avoidance","total_shipping_price","total_trade_price","updated_at","vehicle"],"properties":{"buyer_business_id":{"description":"The ID of the buyer's repairer business (resolve via `entities.businesses`).\nLegacy stopgap; treat as informational only.","$ref":"#/components/schemas/uuid.Uuid"},"buyer_metadata":{"description":"Buyer-provided key-value metadata for external system correlation.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"buyer_organization_id":{"description":"The ID of the buyer organisation (resolve via `entities.organizations`).","$ref":"#/components/schemas/uuid.Uuid"},"buyer_reference":{"description":"The buyer's own reference number (e.g., BMS number).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"buyer_shipping_address":{"description":"The buyer's shipping address (snapshot at procurement creation).","$ref":"#/components/schemas/procurement.Address"},"buyer_site_id":{"description":"The ID of the buyer's repairer site (resolve via `entities.businesses`).","$ref":"#/components/schemas/uuid.Uuid"},"claim_ids":{"description":"Claims on this procurement (resolve via `entities.claims`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"created_at":{"description":"When this procurement was created.","type":"string","format":"date-time"},"currency_code":{"description":"The alpha-3 currency code for the transaction (e.g., \"NZD\").","$ref":"#/components/schemas/std.string.String"},"files":{"description":"Procurement-level (general) files. Item-scoped files live on each\nsource/offered item in `entities`.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"id":{"description":"A unique identifier for the procurement.","$ref":"#/components/schemas/uuid.Uuid"},"insurer_reference":{"description":"The insurer's reference number (e.g., claim number).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_id":{"description":"The job ID from which this procurement originates.","$ref":"#/components/schemas/uuid.Uuid"},"job_source":{"description":"The type of job this procurement originates from (bodyshop\nvs. workshop).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.JobSource"}]},"latest_edition":{"description":"Optimistic-concurrency version. Pass it back as `if.matches.edition` on\na mutation to reject the write if the procurement changed in between.\n\nIncrements on every write to the procurement itself and its items —\noffer, confirm, order, request and close. Notes, claims, shipments,\nassignees and events are appended alongside a procurement rather than\ncontended over, so they deliberately leave this untouched: a stable\n`latest_edition` does NOT mean those are unchanged.","$ref":"#/components/schemas/u64"},"note_ids":{"description":"IDs of procurement-level notes (resolve via `entities.notes`). Item-scoped\nnotes live on each source/offered item.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"reference":{"description":"A human-friendly shared reference (e.g., job number + random characters).","$ref":"#/components/schemas/std.string.String"},"removed_items":{"description":"Items this procurement no longer carries. Absent unless the\n`removed_items` expand was requested; present and empty when it was\nrequested and nothing has been removed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.RemovedItemIds"}]},"request_snapshot":{"description":"Snapshot used when this supplier was first asked for offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipment_ids":{"description":"IDs of the shipments associated with this procurement (resolve via\n`entities.shipments`). Empty until the order is confirmed, and empty\nwhen the `shipments` group was not requested via `expand`.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"snapshot":{"description":"Supply snapshot reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"source_item_ids":{"description":"IDs of the source items for this procurement (resolve via `entities.source_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplier_business_id":{"description":"The ID of the supplier business (resolve via `entities.businesses`).","$ref":"#/components/schemas/uuid.Uuid"},"supplier_organization_id":{"description":"The ID of the supplier organisation (resolve via `entities.organizations`).","$ref":"#/components/schemas/uuid.Uuid"},"total_loss_avoidance":{"description":"Whether this procurement is part of a total-loss-avoidance flow.","$ref":"#/components/schemas/bool"},"total_shipping_price":{"description":"The total shipping price.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ShippingPrice"}]},"total_trade_price":{"description":"The total trade price across all offered items (trade_price × quantity).","$ref":"#/components/schemas/std.string.String"},"updated_at":{"description":"When this procurement was last updated.","type":"string","format":"date-time"},"vehicle":{"description":"The vehicle the parts are being procured for.","$ref":"#/components/schemas/procurement.Vehicle"}}}]},"procurement.buyer.ProcurementInserted":{"description":"Procurement insert snapshot visible to the buyer.","type":"object","title":"procurement.buyer.ProcurementInserted","required":["buyer_business_id","buyer_metadata","buyer_org_id","buyer_reference","buyer_site_address","buyer_site_id","currency_code","deliver_after","files","insurer_reference","job_id","reference","status","supplier_business_id","supplier_org_id","total_shipping_price","vehicle"],"properties":{"buyer_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"buyer_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"buyer_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"buyer_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"buyer_site_address":{"$ref":"#/components/schemas/procurement.Address"},"buyer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"currency_code":{"$ref":"#/components/schemas/std.string.String"},"deliver_after":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"insurer_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"},"supplier_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"total_shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle":{"$ref":"#/components/schemas/procurement.Vehicle"}}},"procurement.buyer.RemovedItemIds":{"description":"Ids in `entities` belonging to items the procurement no longer carries.","type":"object","title":"procurement.buyer.RemovedItemIds","required":["offered_item_ids","source_item_ids"],"properties":{"offered_item_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"source_item_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"procurement.buyer.ShipmentSummary":{"description":"Minimal shipment summary surfaced alongside a procurement. Resolve from\n`entities.shipments` using IDs from `procurement.shipment_ids`.","type":"object","title":"procurement.buyer.ShipmentSummary","required":["id","status"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/procurement.ShipmentStatus"}}},"procurement.buyer.SourceItem":{"allOf":[{"$ref":"#/components/schemas/procurement.buyer.SourcePartState"},{"description":"A source item with its current state.","type":"object","title":"procurement.buyer.SourceItem","required":["created_at","files","id","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"display_order":{"description":"This item's position in the procurement's list.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this source item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this source item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}}]},"procurement.buyer.SourcePartState":{"oneOf":[{"type":"object","title":"buyer_requested","required":["buyer_part","type"],"properties":{"buyer_part":{"$ref":"#/components/schemas/procurement.buyer.BuyerPart"},"type":{"const":"buyer_requested"}}},{"type":"object","title":"supplier_corrected","required":["buyer_part","reason","supplier_part","type"],"properties":{"buyer_part":{"$ref":"#/components/schemas/procurement.buyer.BuyerPart"},"reason":{"$ref":"#/components/schemas/procurement.CorrectedPartReason"},"supplier_part":{"$ref":"#/components/schemas/procurement.buyer.SupplierPart"},"type":{"const":"supplier_corrected"}}},{"type":"object","title":"supplier_removed","required":["buyer_part","reason","type"],"properties":{"buyer_part":{"$ref":"#/components/schemas/procurement.buyer.BuyerPart"},"reason":{"$ref":"#/components/schemas/procurement.RemovePartReason"},"type":{"const":"supplier_removed"}}},{"type":"object","title":"supplier_added","required":["reason","supplier_part","type"],"properties":{"reason":{"$ref":"#/components/schemas/procurement.AddPartReason"},"supplier_part":{"$ref":"#/components/schemas/procurement.buyer.SupplierPart"},"type":{"const":"supplier_added"}}}]},"procurement.buyer.Status":{"oneOf":[{"description":"Offers have been requested from the supplier.","type":"object","title":"offers_requested","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DeliveryDeadline"}]},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"offers_requested"}}},{"description":"The supplier has sent offers back.","type":"object","title":"offers_sent","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DeliveryDeadline"}]},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"offers_sent"}}},{"description":"The buyer has placed an order.","type":"object","title":"order_requested","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DeliveryDeadline"}]},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"order_requested"}}},{"description":"The supplier has confirmed the order.","type":"object","title":"order_confirmed","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","$ref":"#/components/schemas/procurement.DeliveryDeadline"},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"order_confirmed"}}},{"description":"The procurement is being fulfilled off-network (outside the platform).","type":"object","title":"off_network","required":["delivery","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","$ref":"#/components/schemas/procurement.DeliveryDeadline"},"status":{"const":"off_network"}}},{"description":"The procurement has been closed.","type":"object","title":"closed","required":["offered_item_ids","status"],"properties":{"offered_item_ids":{"description":"IDs of items that were offered (snapshot at close time; resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"closed"}}}]},"procurement.buyer.SupplierPart":{"description":"The part details provided by the supplier (correction or addition).","type":"object","title":"procurement.buyer.SupplierPart","required":["description","part_identity","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"}}},"procurement.buyer.draft.AssemblyOffer":{"description":"An assembly offer (buyer draft — all fields optional).","type":"object","title":"procurement.buyer.draft.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.AssemblyItem"}},"inventory":{"description":"The inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.draft.BundleOffer":{"description":"A bundle offer (buyer draft — all fields optional, no part identity).","type":"object","title":"procurement.buyer.draft.BundleOffer","required":["description","lead_time","pricing","return_policy"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.draft.OfferedItem":{"description":"An offered item in a draft status (buyer view).","type":"object","title":"procurement.buyer.draft.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","supplied_offer","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.buyer.draft.SuppliedOffer"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}},"procurement.buyer.draft.ProductOffer":{"description":"A single product offer (buyer draft — all fields optional).","type":"object","title":"procurement.buyer.draft.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.draft.SuppliedOffer":{"oneOf":[{"description":"A single product offer (buyer draft — all fields optional).","type":"object","title":"procurement.buyer.draft.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly offer (buyer draft — all fields optional).","type":"object","title":"procurement.buyer.draft.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.AssemblyItem"}},"inventory":{"description":"The inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}},{"description":"A bundle offer (buyer draft — all fields optional, no part identity).","type":"object","title":"procurement.buyer.draft.BundleOffer","required":["description","lead_time","pricing","return_policy","type"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"bundle"}}}]},"procurement.buyer.offer.AssemblyItem":{"description":"An item within an assembly offer (buyer view).","type":"object","title":"procurement.buyer.offer.AssemblyItem","required":["condition","description","inventory","part_identity","quantity"],"properties":{"condition":{"description":"The condition of this item. If absent, the parent assembly's\ncondition applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly item.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"Inventory reference for this item.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"quantity":{"description":"Quantity of this item within the assembly.","$ref":"#/components/schemas/u32"}}},"procurement.buyer.offer.BundleAssembly":{"description":"An assembly within a bundle (buyer view).","type":"object","title":"procurement.buyer.offer.BundleAssembly","required":["condition","description","includes","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"description":"The condition of this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The parts that make up this assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.AssemblyItem"}},"inventory":{"description":"Inventory reference for this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"quantity":{"description":"Quantity of this assembly within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.offer.BundleItem":{"oneOf":[{"description":"A standalone product within a bundle (buyer view).","type":"object","title":"procurement.buyer.offer.BundleProduct","required":["condition","description","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the product.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"Inventory reference for this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"quantity":{"description":"Quantity of this product within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly within a bundle (buyer view).","type":"object","title":"procurement.buyer.offer.BundleAssembly","required":["condition","description","includes","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The parts that make up this assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.AssemblyItem"}},"inventory":{"description":"Inventory reference for this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"quantity":{"description":"Quantity of this assembly within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}}]},"procurement.buyer.offer.BundleProduct":{"description":"A standalone product within a bundle (buyer view).","type":"object","title":"procurement.buyer.offer.BundleProduct","required":["condition","description","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"description":"The condition of this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the product.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"Inventory reference for this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"quantity":{"description":"Quantity of this product within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.offer.Inventory":{"description":"Inventory reference from the buyer's perspective (no warehouse details).","type":"object","title":"procurement.buyer.offer.Inventory","required":["sellable_id"],"properties":{"sellable_id":{"description":"The sellable ID.","$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.buyer.offer.OfferPricing":{"description":"Pricing fields visible to the buyer.","type":"object","title":"procurement.buyer.offer.OfferPricing","required":["retail_price","shipping_price","trade_price"],"properties":{"retail_price":{"description":"The retail price (RRP).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"description":"Per-item shipping price. May be omitted if shipping is set\nglobally on the procurement via `total_shipping_price`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"description":"The trade price — what the buyer pays.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.buyer.submitted.AssemblyOffer":{"description":"An assembly offer (buyer submitted — key fields required).","type":"object","title":"procurement.buyer.submitted.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.AssemblyItem"}},"inventory":{"description":"The inventory reference.","$ref":"#/components/schemas/procurement.buyer.offer.Inventory"},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.submitted.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.submitted.BundleOffer":{"description":"A bundle offer (buyer submitted — lead time required, no part identity; return policy optional).","type":"object","title":"procurement.buyer.submitted.BundleOffer","required":["description","lead_time","pricing","return_policy"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.submitted.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.submitted.OfferPricing":{"description":"Pricing fields visible to the buyer (submitted).\n\nIn submitted offers the trade price must eventually be provided.\nUses [`RequiredPricing`] to make a missing value explicit rather\nthan silently absent.","type":"object","title":"procurement.buyer.submitted.OfferPricing","required":["retail_price","shipping_price","trade_price"],"properties":{"retail_price":{"description":"The retail price (RRP).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"description":"Per-item shipping price. May be omitted if shipping is set\nglobally on the procurement via `total_shipping_price`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"description":"The trade price — what the buyer pays.","$ref":"#/components/schemas/procurement.RequiredPricing"}}},"procurement.buyer.submitted.OfferedItem":{"description":"An offered item in a submitted status (buyer view).","type":"object","title":"procurement.buyer.submitted.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","supplied_offer","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.buyer.submitted.SuppliedOffer"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}},"procurement.buyer.submitted.ProductOffer":{"description":"A single product offer (buyer submitted — key fields required).","type":"object","title":"procurement.buyer.submitted.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The inventory reference.","$ref":"#/components/schemas/procurement.buyer.offer.Inventory"},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.submitted.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.buyer.submitted.SuppliedOffer":{"oneOf":[{"description":"A single product offer (buyer submitted — key fields required).","type":"object","title":"procurement.buyer.submitted.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The inventory reference.","$ref":"#/components/schemas/procurement.buyer.offer.Inventory"},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.submitted.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly offer (buyer submitted — key fields required).","type":"object","title":"procurement.buyer.submitted.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.AssemblyItem"}},"inventory":{"description":"The inventory reference.","$ref":"#/components/schemas/procurement.buyer.offer.Inventory"},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN may be hidden).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.HideablePartIdentity"}]},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.submitted.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}},{"description":"A bundle offer (buyer submitted — lead time required, no part identity; return policy optional).","type":"object","title":"procurement.buyer.submitted.BundleOffer","required":["description","lead_time","pricing","return_policy","type"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.offer.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"pricing":{"description":"Pricing for the offer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.buyer.submitted.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"bundle"}}}]},"procurement.repairer.Delivery":{"oneOf":[{"type":"object","title":"asap","required":["type"],"properties":{"type":{"const":"asap"}}},{"type":"object","title":"before","required":["date","type"],"properties":{"date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"type":{"const":"before"}}}]},"procurement.repairer.EventListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.repairer.EventListRequest":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"description":"Request to list events for a procurement (buyer view).","type":"object","title":"procurement.repairer.EventListRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"},"type":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.EventType"}}]}}}]},"procurement.repairer.EventListResponse":{"type":"object","title":"procurement.repairer.EventListResponse","required":["entities","events","pagination"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"events":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.Event"}},"pagination":{"$ref":"#/components/schemas/ForwardPagination"}}},"procurement.repairer.InlineNote":{"description":"A single note in a bundled-save `notes` block.","type":"object","title":"procurement.repairer.InlineNote","required":["content","visibility"],"properties":{"content":{"$ref":"#/components/schemas/std.string.String"},"visibility":{"$ref":"#/components/schemas/procurement.repairer.NoteVisibility"}}},"procurement.repairer.ItemOnOffNetwork":{"oneOf":[{"description":"A job part to include in the off-network order.","type":"object","title":"job_part","required":["job_part_id","type"],"properties":{"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"job_part"}}}]},"procurement.repairer.ItemOnOffersRequest":{"oneOf":[{"description":"A job part to request offers for.","type":"object","title":"job_part","required":["job_part_id","type"],"properties":{"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"job_part"}}}]},"procurement.repairer.ItemOnOrderRequest":{"oneOf":[{"description":"A sellable from the snapshot — the snapshot contains all data needed.\n`job_part_ids` specifies which job parts this sellable should fulfill;\neach must have a match record in the snapshot.","type":"object","title":"sellable","required":["job_part_ids","sellable_id","type"],"properties":{"job_part_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"sellable"}}},{"description":"A job part with no offer — only creates a source item.","type":"object","title":"job_part","required":["job_part_id","type"],"properties":{"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"job_part"}}}]},"procurement.repairer.NoteInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"target_not_in_procurement"},{"const":"empty_content"}]},"procurement.repairer.NoteInsertRequest":{"type":"object","title":"procurement.repairer.NoteInsertRequest","required":["content","identity","visibility"],"properties":{"content":{"$ref":"#/components/schemas/std.string.String"},"identity":{"$ref":"#/components/schemas/procurement.Identity"},"target":{"description":"What the note attaches to. Defaults to the procurement as a whole.","$ref":"#/components/schemas/procurement.repairer.NoteTargetInput"},"visibility":{"description":"Who can see this note: `all` (both sides) or `buyer` (own-side only).","$ref":"#/components/schemas/procurement.repairer.NoteVisibility"}}},"procurement.repairer.NoteInsertResponse":{"type":"object","title":"procurement.repairer.NoteInsertResponse","required":["entities","note"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"note":{"$ref":"#/components/schemas/procurement.buyer.Note"}}},"procurement.repairer.NoteListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.repairer.NoteListRequest":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"description":"Request to list notes for a procurement (buyer view).","type":"object","title":"procurement.repairer.NoteListRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"},"target":{"description":"Optional filter restricting results to a single target.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.repairer.NoteTargetInput"}]}}}]},"procurement.repairer.NoteListResponse":{"type":"object","title":"procurement.repairer.NoteListResponse","required":["entities","notes","pagination"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"notes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.Note"}},"pagination":{"$ref":"#/components/schemas/ForwardPagination"}}},"procurement.repairer.NoteRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"}}}}}]},"procurement.repairer.NoteRemoveRequest":{"type":"object","title":"procurement.repairer.NoteRemoveRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"}}},"procurement.repairer.NoteRemoveResponse":{"type":"object","title":"procurement.repairer.NoteRemoveResponse","properties":{}},"procurement.repairer.NoteTargetInput":{"oneOf":[{"type":"object","title":"procurement","required":["kind"],"properties":{"kind":{"const":"procurement"}}},{"type":"object","title":"source_item","required":["kind","source_item_id"],"properties":{"kind":{"const":"source_item"},"source_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"offered_item","required":["kind","offered_item_id"],"properties":{"kind":{"const":"offered_item"},"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"event","required":["event_id","kind"],"properties":{"event_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"event"}}}]},"procurement.repairer.NoteUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"}}}}},{"const":"empty_content"}]},"procurement.repairer.NoteUpdateRequest":{"type":"object","title":"procurement.repairer.NoteUpdateRequest","required":["content","identity","visibility"],"properties":{"content":{"$ref":"#/components/schemas/std.string.String"},"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"},"visibility":{"$ref":"#/components/schemas/procurement.repairer.NoteVisibility"}}},"procurement.repairer.NoteUpdateResponse":{"type":"object","title":"procurement.repairer.NoteUpdateResponse","required":["entities","note"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"note":{"$ref":"#/components/schemas/procurement.buyer.Note"}}},"procurement.repairer.NoteVisibility":{"oneOf":[{"const":"all"},{"const":"buyer"}]},"procurement.repairer.Notes":{"description":"Notes created atomically alongside an insert/offer. Keys in `source_items`\nare the (client-supplied or existing) source-item ids in the same request.","type":"object","title":"procurement.repairer.Notes","properties":{"procurement":{"description":"Procurement-level notes (`target = procurement`).","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.InlineNote"}},"source_items":{"description":"Notes attached to source items, keyed by source_item id.","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.InlineNote"}}}}},"procurement.repairer.OrderItemAction":{"oneOf":[{"description":"Remove the item identified by `key` from the order.","type":"object","title":"remove","required":["action","key"],"properties":{"action":{"const":"remove"},"key":{"$ref":"#/components/schemas/procurement.repairer.RemoveItemKey"}}},{"oneOf":[{"description":"A sellable from the snapshot — the snapshot contains all data needed.\n`job_part_ids` specifies which job parts this sellable should fulfill;\neach must have a match record in the snapshot.","type":"object","title":"sellable","required":["action","job_part_ids","sellable_id","type"],"properties":{"action":{"const":"insert"},"job_part_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"sellable"}}},{"description":"A job part with no offer — only creates a source item.","type":"object","title":"job_part","required":["action","job_part_id","type"],"properties":{"action":{"const":"insert"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"job_part"}}}]}]},"procurement.repairer.ProcurementCloseAction":{"oneOf":[{"description":"The buyer cancels the order (exceptional flows).","type":"object","title":"procurement.repairer.ProcurementCloseCancelled","required":["note","status"],"properties":{"note":{"description":"Mandatory explanation for the cancellation.","$ref":"#/components/schemas/std.string.String"},"status":{"const":"offers_requested_cancel"}}},{"description":"The buyer declines the offer/order (e.g. chose another).","type":"object","title":"procurement.repairer.ProcurementCloseDeclined","required":["status"],"properties":{"note":{"description":"Optional explanation for the decline.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"const":"offers_sent_decline"}}},{"description":"The buyer cancels the order (exceptional flows).","type":"object","title":"procurement.repairer.ProcurementCloseCancelled","required":["note","status"],"properties":{"note":{"description":"Mandatory explanation for the cancellation.","$ref":"#/components/schemas/std.string.String"},"status":{"const":"order_requested_cancel"}}}]},"procurement.repairer.ProcurementCloseCancelled":{"description":"The buyer cancels the order (exceptional flows).","type":"object","title":"procurement.repairer.ProcurementCloseCancelled","required":["note"],"properties":{"note":{"description":"Mandatory explanation for the cancellation.","$ref":"#/components/schemas/std.string.String"}}},"procurement.repairer.ProcurementCloseData":{"type":"object","title":"procurement.repairer.ProcurementCloseData","required":["action","identity"],"properties":{"action":{"description":"The close action & state of the procurement.","$ref":"#/components/schemas/procurement.repairer.ProcurementCloseAction"},"identity":{"$ref":"#/components/schemas/procurement.Identity"}}},"procurement.repairer.ProcurementCloseDeclined":{"description":"The buyer declines the offer/order (e.g. chose another).","type":"object","title":"procurement.repairer.ProcurementCloseDeclined","properties":{"note":{"description":"Optional explanation for the decline.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.repairer.ProcurementCloseError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"type":"object","title":"edition_conflict","required":["edition_conflict"],"properties":{"edition_conflict":{"type":"object","title":"edition_conflict","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}}]},"procurement.repairer.ProcurementCloseResponse":{"type":"object","title":"procurement.repairer.ProcurementCloseResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}}},"procurement.repairer.ProcurementGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"procurement.repairer.ProcurementGetRequest":{"type":"object","title":"procurement.repairer.ProcurementGetRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"}}},"procurement.repairer.ProcurementGetResponse":{"type":"object","title":"procurement.repairer.ProcurementGetResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}}},"procurement.repairer.ProcurementInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"job_not_found","required":["job_not_found"],"properties":{"job_not_found":{"type":"object","title":"job_not_found","required":["job_id"],"properties":{"job_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"supplier_not_found","required":["supplier_not_found"],"properties":{"supplier_not_found":{"type":"object","title":"supplier_not_found","required":["supplier_org_id"],"properties":{"supplier_org_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"supplier_not_approved","required":["supplier_not_approved"],"properties":{"supplier_not_approved":{"type":"object","title":"supplier_not_approved","required":["supplier_org_id"],"properties":{"supplier_org_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"supplier_business_org_mismatch","required":["supplier_business_org_mismatch"],"properties":{"supplier_business_org_mismatch":{"type":"object","title":"supplier_business_org_mismatch","required":["supplier_business_id","supplier_org_id"],"properties":{"supplier_business_id":{"$ref":"#/components/schemas/std.string.String"},"supplier_org_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"offer_supplier_mismatch","required":["offer_supplier_mismatch"],"properties":{"offer_supplier_mismatch":{"type":"object","title":"offer_supplier_mismatch","required":["offer_id"],"properties":{"offer_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"missing_vehicle"},{"const":"job_not_confirmed"},{"type":"object","title":"invalid_part_ids","required":["invalid_part_ids"],"properties":{"invalid_part_ids":{"type":"object","title":"invalid_part_ids","required":["invalid_ids"],"properties":{"invalid_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"sellable_not_found","required":["sellable_not_found"],"properties":{"sellable_not_found":{"type":"object","title":"sellable_not_found","required":["sellable_id"],"properties":{"sellable_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"missing_site_address"},{"const":"missing_currency_code"},{"type":"object","title":"zero_part_quantity","required":["zero_part_quantity"],"properties":{"zero_part_quantity":{"type":"object","title":"zero_part_quantity","required":["job_part_id"],"properties":{"job_part_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"snapshot_not_found","required":["snapshot_not_found"],"properties":{"snapshot_not_found":{"type":"object","title":"snapshot_not_found","required":["snapshot_hash"],"properties":{"snapshot_hash":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"offer_not_found","required":["offer_not_found"],"properties":{"offer_not_found":{"type":"object","title":"offer_not_found","required":["offer_id"],"properties":{"offer_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"job_part_not_matched_to_offer","required":["job_part_not_matched_to_offer"],"properties":{"job_part_not_matched_to_offer":{"type":"object","title":"job_part_not_matched_to_offer","required":["job_part_id","offer_id"],"properties":{"job_part_id":{"$ref":"#/components/schemas/std.string.String"},"offer_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"empty_note_content"},{"type":"object","title":"unknown_note_target","required":["unknown_note_target"],"properties":{"unknown_note_target":{"type":"object","title":"unknown_note_target","required":["source_item_id"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"procurement.repairer.ProcurementInsertRequest":{"oneOf":[{"type":"object","title":"offers_requested","required":["buyer_metadata","buyer_reference","delivery","items","job_id","status","supplier"],"properties":{"buyer_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"buyer_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"delivery":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.repairer.Delivery"}]},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.ItemOnOffersRequest"}},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"notes":{"$ref":"#/components/schemas/procurement.repairer.Notes"},"snapshot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.repairer.SnapshotRef"}]},"status":{"const":"offers_requested"},"supplier":{"$ref":"#/components/schemas/procurement.repairer.Supplier"}}},{"type":"object","title":"order_requested","required":["buyer_metadata","buyer_reference","delivery","items","job_id","snapshot","status","supplier"],"properties":{"buyer_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"buyer_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"delivery":{"$ref":"#/components/schemas/procurement.repairer.Delivery"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.ItemOnOrderRequest"}},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"notes":{"$ref":"#/components/schemas/procurement.repairer.Notes"},"snapshot":{"$ref":"#/components/schemas/procurement.repairer.SnapshotRef"},"status":{"const":"order_requested"},"supplier":{"$ref":"#/components/schemas/procurement.repairer.Supplier"}}},{"type":"object","title":"off_network","required":["buyer_metadata","buyer_reference","delivery","items","job_id","status","supplier"],"properties":{"buyer_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"buyer_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"delivery":{"$ref":"#/components/schemas/procurement.repairer.Delivery"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.ItemOnOffNetwork"}},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"notes":{"$ref":"#/components/schemas/procurement.repairer.Notes"},"status":{"const":"off_network"},"supplier":{"$ref":"#/components/schemas/procurement.repairer.Supplier"}}}]},"procurement.repairer.ProcurementInsertResponse":{"type":"object","title":"procurement.repairer.ProcurementInsertResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}}},"procurement.repairer.ProcurementOrderData":{"type":"object","title":"procurement.repairer.ProcurementOrderData","required":["delivery","identity"],"properties":{"buyer_reference":{"description":"Buyer's own reference for the procurement. Undefined leaves the\nexisting value untouched; unlike `.request`, `.order` doesn't\nunconditionally overwrite it.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"delivery":{"$ref":"#/components/schemas/procurement.repairer.Delivery"},"files":{"description":"Buyer-attributed procurement-level files.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}}]},"identity":{"$ref":"#/components/schemas/procurement.Identity"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.OrderItemAction"}},"notes":{"$ref":"#/components/schemas/procurement.repairer.Notes"},"snapshot":{"description":"Offer snapshot for resolving `Insert` item actions.\nMay be omitted for Remove-only or delivery-only requests.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.repairer.SnapshotRef"}]}}},"procurement.repairer.ProcurementOrderError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["current"],"properties":{"current":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"type":"object","title":"offered_item_not_found","required":["offered_item_not_found"],"properties":{"offered_item_not_found":{"type":"object","title":"offered_item_not_found","required":["key"],"properties":{"key":{"$ref":"#/components/schemas/procurement.repairer.RemoveItemKey"}}}}},{"type":"object","title":"sellable_not_found","required":["sellable_not_found"],"properties":{"sellable_not_found":{"type":"object","title":"sellable_not_found","required":["sellable_id"],"properties":{"sellable_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"source_item_not_found","required":["source_item_not_found"],"properties":{"source_item_not_found":{"type":"object","title":"source_item_not_found","required":["job_part_id"],"properties":{"job_part_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"snapshot_not_found","required":["snapshot_not_found"],"properties":{"snapshot_not_found":{"type":"object","title":"snapshot_not_found","required":["snapshot_hash"],"properties":{"snapshot_hash":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"offer_not_found","required":["offer_not_found"],"properties":{"offer_not_found":{"type":"object","title":"offer_not_found","required":["offer_id"],"properties":{"offer_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"job_part_not_matched_to_offer","required":["job_part_not_matched_to_offer"],"properties":{"job_part_not_matched_to_offer":{"type":"object","title":"job_part_not_matched_to_offer","required":["job_part_id","offer_id"],"properties":{"job_part_id":{"$ref":"#/components/schemas/std.string.String"},"offer_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"offer_supplier_mismatch","required":["offer_supplier_mismatch"],"properties":{"offer_supplier_mismatch":{"type":"object","title":"offer_supplier_mismatch","required":["offer_id"],"properties":{"offer_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_part_ids","required":["invalid_part_ids"],"properties":{"invalid_part_ids":{"type":"object","title":"invalid_part_ids","required":["invalid_ids"],"properties":{"invalid_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"const":"snapshot_required"},{"const":"empty_note_content"},{"type":"object","title":"unknown_note_target","required":["unknown_note_target"],"properties":{"unknown_note_target":{"type":"object","title":"unknown_note_target","required":["source_item_id"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"edition_conflict","required":["edition_conflict"],"properties":{"edition_conflict":{"type":"object","title":"edition_conflict","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}}]},"procurement.repairer.ProcurementOrderResponse":{"type":"object","title":"procurement.repairer.ProcurementOrderResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}}},"procurement.repairer.ProcurementRequestData":{"description":"Revise an existing offer-request procurement. Updates job parts (via\n`items`) and overwrites the buyer-supplied fields, without changing status.","type":"object","title":"procurement.repairer.ProcurementRequestData","required":["delivery","identity"],"properties":{"buyer_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"buyer_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"delivery":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.repairer.Delivery"}]},"files":{"description":"Buyer-attributed procurement-level files.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}}]},"identity":{"$ref":"#/components/schemas/procurement.Identity"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.RequestItemAction"}},"notes":{"$ref":"#/components/schemas/procurement.repairer.Notes"},"snapshot":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.repairer.SnapshotRef"}]}}},"procurement.repairer.ProcurementRequestError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["current"],"properties":{"current":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"type":"object","title":"source_item_not_found","required":["source_item_not_found"],"properties":{"source_item_not_found":{"type":"object","title":"source_item_not_found","required":["job_part_id"],"properties":{"job_part_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_part_ids","required":["invalid_part_ids"],"properties":{"invalid_part_ids":{"type":"object","title":"invalid_part_ids","required":["invalid_ids"],"properties":{"invalid_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"snapshot_not_found","required":["snapshot_not_found"],"properties":{"snapshot_not_found":{"type":"object","title":"snapshot_not_found","required":["snapshot_hash"],"properties":{"snapshot_hash":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"empty_note_content"},{"type":"object","title":"unknown_note_target","required":["unknown_note_target"],"properties":{"unknown_note_target":{"type":"object","title":"unknown_note_target","required":["source_item_id"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"edition_conflict","required":["edition_conflict"],"properties":{"edition_conflict":{"type":"object","title":"edition_conflict","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}}]},"procurement.repairer.ProcurementRequestResponse":{"type":"object","title":"procurement.repairer.ProcurementRequestResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}}},"procurement.repairer.ProcurementSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"query_too_long","required":["query_too_long"],"properties":{"query_too_long":{"type":"object","title":"query_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"procurement.repairer.ProcurementSearchExpand":{"oneOf":[{"const":"source_items"},{"const":"offered_items"},{"const":"shipments"},{"const":"claims"},{"const":"removed_items","description":"Offers and parts the procurement no longer carries, rebuilt from its\nremoval events."}]},"procurement.repairer.ProcurementSearchRequest":{"type":"object","title":"procurement.repairer.ProcurementSearchRequest","properties":{"assigned_to":{"description":"Restrict to procurements with at least one of these buyer-side users\nassigned. An empty list is ignored (no filter applied).","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"date_range":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DateRange"}]},"expand":{"description":"Side-loaded entity groups to include in `entities`. Omitted or empty\nloads organizations + businesses only. `source_items` / `offered_items`\nare always loaded with the procurement; selecting them only controls\nwhether they appear in `entities`.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.repairer.ProcurementSearchExpand"}}]},"initiator":{"description":"Restrict by initiator type/identity. Variants are combined with OR.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.InitiatorFilter"}}]},"job_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"job_ids":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"job_source":{"description":"Restrict by job source (bodyshop/workshop). An empty or omitted list\napplies no filter.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.JobSource"}}]},"page":{"$ref":"#/components/schemas/procurement.SearchPageRequest"},"query":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}]}}},"procurement.repairer.ProcurementSearchResponse":{"allOf":[{"description":"Forward-paginated list plus the total number of items matching the\nrequest, independent of pagination. Use this for endpoints whose\nclients render \"showing N of M\" counts or drive page-number UIs.","type":"object","title":"ForwardPaginatedListWithTotal<procurement.buyer.Procurement>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}},"pagination":{"$ref":"#/components/schemas/ForwardPaginationWithTotal"}}},{"type":"object","title":"procurement.repairer.ProcurementSearchResponse","required":["entities"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.buyer.Entities"}}}]},"procurement.repairer.RemoveItemKey":{"oneOf":[{"type":"object","title":"sellable_id","required":["sellable_id","type"],"properties":{"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"sellable_id"}}},{"type":"object","title":"job_part_id","required":["job_part_id","type"],"properties":{"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"type":{"const":"job_part_id"}}}]},"procurement.repairer.RequestItemAction":{"oneOf":[{"description":"Add the job part to the request, creating a buyer source item. If the\npart is already on the procurement, its buyer data is refreshed.","type":"object","title":"insert","required":["action","job_part_id"],"properties":{"action":{"const":"insert"},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"Remove the job part (and its source item) from the request.","type":"object","title":"remove","required":["action","job_part_id"],"properties":{"action":{"const":"remove"},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"procurement.repairer.ShipmentEntities":{"description":"Side-loaded entity data for shipment search responses.\n\nEach shipment references its parent procurement by ID; resolve it here.\nProcurements are shallow — their own item entities are not surfaced — but\nthe organisations and businesses they reference (buyer/supplier/work\nprovider) are included so callers can resolve the shipment's parties.","type":"object","title":"procurement.repairer.ShipmentEntities","required":["businesses","organizations","procurements"],"properties":{"businesses":{"description":"Businesses referenced by the procurements (buyer site, buyer business, supplier).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Business"}},"organizations":{"description":"Organisations referenced by the procurements (buyer, supplier, work provider).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Organization"}},"procurements":{"description":"Parent procurements referenced by the shipments, keyed by procurement ID.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}}}},"procurement.repairer.ShipmentGetEntities":{"description":"Side-loaded entity data for the single-shipment get response: everything\nthe search entities carry, plus the offered items fulfilling this\nshipment's own `shipment_items`.","type":"object","title":"procurement.repairer.ShipmentGetEntities","required":["businesses","offered_items","organizations","procurements"],"properties":{"businesses":{"description":"Businesses referenced by the procurement (buyer site, buyer business, supplier).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Business"}},"offered_items":{"description":"Offered items fulfilling the shipment's own `shipment_items`, keyed by\noffered item ID. The offer↔item join is `items[].offered_item_id`.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.buyer.OfferedItem"}},"organizations":{"description":"Organisations referenced by the procurement (buyer, supplier, work provider).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Organization"}},"procurements":{"description":"The parent procurement, keyed by procurement ID.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.buyer.Procurement"}}}},"procurement.repairer.ShipmentGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["shipment_id"],"properties":{"shipment_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"procurement.repairer.ShipmentGetRequest":{"type":"object","title":"procurement.repairer.ShipmentGetRequest","required":["shipment_id"],"properties":{"shipment_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.repairer.ShipmentGetResponse":{"type":"object","title":"procurement.repairer.ShipmentGetResponse","required":["entities","items","shipment"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.repairer.ShipmentGetEntities"},"items":{"description":"The shipment's own line items, oldest first.","type":"array","items":{"$ref":"#/components/schemas/procurement.ShipmentItem"}},"shipment":{"$ref":"#/components/schemas/procurement.Shipment"}}},"procurement.repairer.ShipmentSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"query_too_long","required":["query_too_long"],"properties":{"query_too_long":{"type":"object","title":"query_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"procurement.repairer.ShipmentSearchRequest":{"type":"object","title":"procurement.repairer.ShipmentSearchRequest","properties":{"buyer_site_id":{"description":"Restrict to shipments whose parent procurement was raised for this\nrepairer site (`buyer_site_id`). Access stays org-scoped; this only\nnarrows the caller's own org to one of its sites.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"created_date_range":{"description":"Filter by the shipment's created date. Bounds are half-open: `after`\ninclusive, `before` exclusive. Callers resolve presets (today, tomorrow,\ncustom) into concrete UTC bounds.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DateRange"}]},"delivery_date_range":{"description":"Filter by the parent procurement's requested delivery date\n(`deliver_after`). Same half-open bounds as `date_range`. Shipments whose\nparent has no requested delivery date are excluded when this is present.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DateRange"}]},"page":{"description":"Pagination and sort. `order_by` supports `created_at` and\n`deliver_after` (the parent procurement's requested delivery date),\nascending or descending.","$ref":"#/components/schemas/procurement.SearchPageRequest"},"query":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"description":"Filter by shipment status. When present and non-empty, only shipments\nwhose status is one of these are returned.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.ShipmentStatus"}}]}}},"procurement.repairer.ShipmentSearchResponse":{"type":"object","title":"procurement.repairer.ShipmentSearchResponse","required":["entities","items","pagination"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.repairer.ShipmentEntities"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.Shipment"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}},"procurement.repairer.SnapshotRef":{"description":"Reference to an offer snapshot. The job_id is already on the request.","type":"object","title":"procurement.repairer.SnapshotRef","required":["hash","version"],"properties":{"hash":{"$ref":"#/components/schemas/std.string.String"},"version":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]}}},"procurement.repairer.Supplier":{"type":"object","title":"procurement.repairer.Supplier","required":["business_id","org_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"org_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.supplier.AssemblyItemInput":{"description":"Assembly child for an offered item. A non-null `id` keeps the existing\nchild row; a null `id` creates a new child. Omitted children (not\npresent in the parent's `includes`) are deleted on Update.","type":"object","title":"procurement.supplier.AssemblyItemInput","required":["condition","description","id","inventory","part_identity","quantity"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryInput"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"}}},"procurement.supplier.Assignment":{"description":"A procurement assignment referencing a user by ID.","type":"object","title":"procurement.supplier.Assignment","required":["assigned_at","user_id"],"properties":{"assigned_at":{"description":"When the assignment was made.","type":"string","format":"date-time"},"user_id":{"description":"The assigned user's ID (resolve via `entities.users`).","$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.supplier.BundleAssemblyInput":{"description":"An assembly within a bundle.","type":"object","title":"procurement.supplier.BundleAssemblyInput","required":["condition","description","id","includes","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"includes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.AssemblyItemInput"}},"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryInput"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.BundleItemInput":{"oneOf":[{"description":"A standalone product within a bundle.","type":"object","title":"procurement.supplier.BundleProductInput","required":["condition","description","id","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryInput"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly within a bundle.","type":"object","title":"procurement.supplier.BundleAssemblyInput","required":["condition","description","id","includes","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"includes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.AssemblyItemInput"}},"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryInput"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}}]},"procurement.supplier.BundleProductInput":{"description":"A standalone product within a bundle.","type":"object","title":"procurement.supplier.BundleProductInput","required":["condition","description","id","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryInput"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.BuyerPart":{"description":"The part that the buyer requested.","type":"object","title":"procurement.supplier.BuyerPart","required":["assembly","description","ghca_id","job_part_id","part_identity","quantity","retail_price"],"properties":{"assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.Assembly"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.supplier.ClaimAttachmentField":{"oneOf":[{"const":"storage_key"},{"const":"filename"},{"const":"mime_type"}]},"procurement.supplier.ClaimAttachmentInput":{"description":"File metadata to attach when creating a claim.","type":"object","title":"procurement.supplier.ClaimAttachmentInput","required":["filename","mime_type","size_bytes","storage_key"],"properties":{"filename":{"description":"Display filename shown to users.","$ref":"#/components/schemas/std.string.String"},"mime_type":{"description":"MIME type of the uploaded file.","$ref":"#/components/schemas/std.string.String"},"size_bytes":{"description":"File size in bytes. Must be non-negative.","$ref":"#/components/schemas/i64"},"storage_key":{"description":"Opaque object-storage key returned by\n`supplier.procurements.claims.attachments.prepare`.","$ref":"#/components/schemas/std.string.String"}}},"procurement.supplier.ClaimAttachmentPrepareFile":{"description":"Client-provided display and validation metadata for a claim attachment.","type":"object","title":"procurement.supplier.ClaimAttachmentPrepareFile","required":["filename","mime_type","size_bytes"],"properties":{"filename":{"description":"Original filename to display to users.","$ref":"#/components/schemas/std.string.String"},"mime_type":{"description":"MIME type of the file being uploaded.","$ref":"#/components/schemas/std.string.String"},"size_bytes":{"description":"File size in bytes.","$ref":"#/components/schemas/i64"}}},"procurement.supplier.ClaimAttachmentPrepareUpload":{"description":"A short-lived private upload slot for one claim attachment.","type":"object","title":"procurement.supplier.ClaimAttachmentPrepareUpload","required":["expires_at","storage_key","upload_url"],"properties":{"expires_at":{"description":"Time when `upload_url` expires.","type":"string","format":"date-time"},"storage_key":{"description":"Opaque object-storage key to pass into claim creation after upload.","$ref":"#/components/schemas/std.string.String"},"upload_url":{"description":"Pre-signed URL for uploading the file bytes with HTTP PUT.","$ref":"#/components/schemas/std.string.String"}}},"procurement.supplier.ClaimAttachmentsPrepareError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"type":"object","title":"too_many_attachments","required":["too_many_attachments"],"properties":{"too_many_attachments":{"type":"object","title":"too_many_attachments","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"attachment_too_large","required":["attachment_too_large"],"properties":{"attachment_too_large":{"type":"object","title":"attachment_too_large","required":["max_bytes"],"properties":{"max_bytes":{"$ref":"#/components/schemas/i64"}}}}},{"type":"object","title":"mime_not_allowed","required":["mime_not_allowed"],"properties":{"mime_not_allowed":{"type":"object","title":"mime_not_allowed","required":["allowed"],"properties":{"allowed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}},{"type":"object","title":"invalid_attachment","required":["invalid_attachment"],"properties":{"invalid_attachment":{"type":"object","title":"invalid_attachment","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"procurement.supplier.ClaimAttachmentsPrepareRequest":{"description":"Request to prepare private uploads for files that will be attached to a\nsupplier-created return claim.\n\nThe returned storage keys are server-generated and scoped to the\nprocurement. Upload the bytes to each `upload_url`, then pass the matching\nstorage metadata into `supplier.procurements.claims.insert`.","type":"object","title":"procurement.supplier.ClaimAttachmentsPrepareRequest","required":["files","identity"],"properties":{"files":{"description":"Files that need upload URLs.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.ClaimAttachmentPrepareFile"}},"identity":{"description":"Procurement the future claim attachments will belong to.","$ref":"#/components/schemas/procurement.Identity"}}},"procurement.supplier.ClaimAttachmentsPrepareResponse":{"description":"Prepared private uploads for claim attachments.","type":"object","title":"procurement.supplier.ClaimAttachmentsPrepareResponse","required":["uploads"],"properties":{"uploads":{"description":"Upload slots in the same order as the requested files.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.ClaimAttachmentPrepareUpload"}}}},"procurement.supplier.ClaimInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"const":"empty_items"},{"const":"duplicate_offered_items"},{"type":"object","title":"invalid_offered_items","required":["invalid_offered_items"],"properties":{"invalid_offered_items":{"type":"object","title":"invalid_offered_items","required":["offered_item_ids"],"properties":{"offered_item_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}},{"type":"object","title":"quantity_exceeds_offered","required":["quantity_exceeds_offered"],"properties":{"quantity_exceeds_offered":{"type":"object","title":"quantity_exceeds_offered","required":["offered_item_id","quantity_offered","quantity_returned"],"properties":{"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity_offered":{"$ref":"#/components/schemas/u32"},"quantity_returned":{"$ref":"#/components/schemas/u32"}}}}},{"type":"object","title":"invalid_sub_return","required":["invalid_sub_return"],"properties":{"invalid_sub_return":{"type":"object","title":"invalid_sub_return","required":["offered_item_id","sellable_id"],"properties":{"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"conflicting_return_scope","required":["conflicting_return_scope"],"properties":{"conflicting_return_scope":{"type":"object","title":"conflicting_return_scope","required":["offered_item_id"],"properties":{"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"too_many_attachments","required":["too_many_attachments"],"properties":{"too_many_attachments":{"type":"object","title":"too_many_attachments","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}},{"type":"object","title":"invalid_attachment_field","required":["invalid_attachment_field"],"properties":{"invalid_attachment_field":{"type":"object","title":"invalid_attachment_field","required":["field"],"properties":{"field":{"$ref":"#/components/schemas/procurement.supplier.ClaimAttachmentField"}}}}},{"const":"attachment_not_prepared"},{"type":"object","title":"attachment_too_large","required":["attachment_too_large"],"properties":{"attachment_too_large":{"type":"object","title":"attachment_too_large","required":["max_bytes"],"properties":{"max_bytes":{"$ref":"#/components/schemas/i64"}}}}},{"type":"object","title":"mime_not_allowed","required":["mime_not_allowed"],"properties":{"mime_not_allowed":{"type":"object","title":"mime_not_allowed","required":["allowed"],"properties":{"allowed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}}]},"procurement.supplier.ClaimInsertItemRequest":{"description":"A returned offered item in a claim insert request.","type":"object","title":"procurement.supplier.ClaimInsertItemRequest","required":["offered_item_id","quantity_returned"],"properties":{"offered_item_id":{"description":"Offered item being returned.\n\nFor a bundle sub-return this is the bundle's offered item; otherwise the\nproduct or assembly being returned.","$ref":"#/components/schemas/uuid.Uuid"},"quantity_returned":{"description":"Quantity of the offered item being returned.\n\nMust be greater than zero and cannot exceed the quantity offered on the\nprocurement (or the bundle child for a sub-return).","$ref":"#/components/schemas/u32"},"sellable_id":{"description":"Child sellable within `offered_item_id` to return for a bundle\nsub-return.\n\nLeave unset to return the whole offered item. When set, `offered_item_id`\nmust be a bundle and the sellable must belong to it; the returned\nquantity is bounded by that child's quantity in the bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"procurement.supplier.ClaimInsertRequest":{"description":"Request to record returned offered items on a confirmed procurement.\n\nSupplier-created return claims are accepted immediately. The returned\nquantities are exposed on the procurement activity feed and can be used by\ndownstream billing processors to calculate the financial adjustment from\nthe confirmed offer pricing.","type":"object","title":"procurement.supplier.ClaimInsertRequest","required":["identity","items"],"properties":{"attachments":{"description":"Evidence or credit-note files to attach to the claim.\n\nThe client should upload bytes first and send the resulting storage\nmetadata here. Attachment rows are committed atomically with the claim.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.ClaimAttachmentInput"}},"description":{"description":"Optional supplier-facing note explaining why the items were returned.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"identity":{"description":"Procurement to create the return claim on.","$ref":"#/components/schemas/procurement.Identity"},"items":{"description":"Offered items and quantities being returned.\n\nEach `(offered_item_id, sellable_id)` pair may appear at most once in\nthe request. An offered item is claimed in a single mode: either the\nwhole item (no `sellable_id`) or specific bundle children, never both.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.ClaimInsertItemRequest"}}}},"procurement.supplier.ClaimInsertResponse":{"description":"Response returned after a supplier records returned offered items.","type":"object","title":"procurement.supplier.ClaimInsertResponse","required":["claim"],"properties":{"claim":{"description":"Created return claim with its returned line items.","$ref":"#/components/schemas/procurement.Claim"}}},"procurement.supplier.ClaimListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.supplier.ClaimListRequest":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"description":"Request to list return claims.\n\nOmit `procurement_id` to list every claim belonging to the supplier\norganisation across its procurements; supply it to scope to one\nprocurement. Optionally narrow by claim `status`.","type":"object","title":"procurement.supplier.ClaimListRequest","properties":{"procurement_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"status":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.ClaimStatus"}}]}}}]},"procurement.supplier.ClaimListResponse":{"description":"A page of claims, newest first.","type":"object","title":"procurement.supplier.ClaimListResponse","required":["claims","pagination"],"properties":{"claims":{"description":"Claims ordered by creation time, newest first.","type":"array","items":{"$ref":"#/components/schemas/procurement.Claim"}},"pagination":{"$ref":"#/components/schemas/ForwardPagination"}}},"procurement.supplier.ClientEvent":{"oneOf":[{"type":"object","title":"user_viewed","required":["type"],"properties":{"type":{"const":"user_viewed"}}}]},"procurement.supplier.DeliveryOverride":{"oneOf":[{"description":"Only permitted if the buyer requested ASAP (`deliver_after` is null).","type":"object","title":"after","required":["deliver_after","type"],"properties":{"deliver_after":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"type":{"const":"after"}}},{"type":"object","title":"asap","required":["type"],"properties":{"type":{"const":"asap"}}}]},"procurement.supplier.Entities":{"description":"Side-loaded entity data for supplier API responses.\n\nEach map is keyed by the entity's UUID. Procurement objects reference\nentities by ID; callers look up the full data here.","type":"object","title":"procurement.supplier.Entities","properties":{"businesses":{"description":"Businesses referenced by this response (buyer site, buyer business, supplier).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Business"}},"claim_items":{"description":"Claim item summaries referenced by offered items, keyed by claim item ID.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.ClaimItemSummary"}},"claims":{"description":"Claim summaries referenced by this response, keyed by claim ID.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.ClaimSummary"}},"events":{"description":"Events referenced by this response, keyed by event id.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.supplier.Event"}},"notes":{"description":"Notes referenced by this response, keyed by note id. Only notes referenced\nfrom `procurement`/`source_item`/`offered_item` `note_ids` appear here;\nevent-targeted and unreferenced notes are fetched via `notes.list` /\nthe events list instead.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.supplier.Note"}},"offered_items":{"description":"Offered items for this procurement (keyed by offered item ID).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.supplier.OfferedItem"}},"organizations":{"description":"Organisations referenced by this response (buyer, supplier, work provider).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Organization"}},"shipments":{"description":"Shipment summaries referenced by this response, keyed by shipment ID.\nOmitted when there are no shipments.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.supplier.ShipmentSummary"}},"source_items":{"description":"Source items referenced by this response (keyed by source item ID).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.supplier.SourceItem"}},"users":{"description":"Users referenced by this response (assignees).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.User"}}}},"procurement.supplier.Event":{"allOf":[{"$ref":"#/components/schemas/procurement.supplier.EventPayload"},{"description":"A procurement event enriched for the supplier-facing API. Combines the\nstable event metadata (id, actor, correlation, timestamp) with a\nsupplier-filtered payload view.","type":"object","title":"procurement.supplier.Event","required":["actor","correlation_id","created_at","id"],"properties":{"actor":{"$ref":"#/components/schemas/procurement.Actor"},"correlation_id":{"$ref":"#/components/schemas/uuid.Uuid"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"Ids of notes attached to this event (resolve via `entities.notes`).\nPopulated only by `events.list`; empty elsewhere.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}]},"procurement.supplier.EventGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.EventIdentity"}}}}}]},"procurement.supplier.EventGetRequest":{"description":"Request to get a single event for a procurement (supplier view).","type":"object","title":"procurement.supplier.EventGetRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.EventIdentity"}}},"procurement.supplier.EventGetResponse":{"type":"object","title":"procurement.supplier.EventGetResponse","required":["entities","event"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"event":{"$ref":"#/components/schemas/procurement.supplier.Event"}}},"procurement.supplier.EventInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"procurement.supplier.EventInsertRequest":{"type":"object","title":"procurement.supplier.EventInsertRequest","required":["event","identity"],"properties":{"event":{"$ref":"#/components/schemas/procurement.supplier.ClientEvent"},"identity":{"$ref":"#/components/schemas/procurement.Identity"}}},"procurement.supplier.EventInsertResponse":{"type":"object","title":"procurement.supplier.EventInsertResponse","required":["entities","event"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"event":{"$ref":"#/components/schemas/procurement.supplier.Event"}}},"procurement.supplier.EventListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.supplier.EventListRequest":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"description":"Request to list events for a procurement (supplier view).","type":"object","title":"procurement.supplier.EventListRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"},"type":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.EventType"}}]}}}]},"procurement.supplier.EventListResponse":{"type":"object","title":"procurement.supplier.EventListResponse","required":["entities","events","pagination"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"events":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.Event"}},"pagination":{"$ref":"#/components/schemas/ForwardPagination"}}},"procurement.supplier.EventPayload":{"oneOf":[{"type":"object","title":"procurement_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.supplier.ProcurementInsertedSnapshot"},"type":{"const":"procurement_inserted"}}},{"type":"object","title":"status_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.StatusUpdatedSnapshot"},"type":{"const":"status_updated"}}},{"type":"object","title":"procurement_closed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ProcurementClosedSnapshot"},"type":{"const":"procurement_closed"}}},{"type":"object","title":"source_items_inserted","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.supplier.SourceItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.SourceItem"}}}},"type":{"const":"source_items_inserted"}}},{"type":"object","title":"source_items_updated","required":["payload","type"],"properties":{"payload":{"description":"Wraps a list of before/after pairs for `*Updated` payloads.","type":"object","title":"procurement.ItemChangesSnapshot<procurement.supplier.SourceItem>","required":["changes"],"properties":{"changes":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"procurement.ItemChangeSnapshot<procurement.supplier.SourceItem>","required":["after","before","id"],"properties":{"after":{"$ref":"#/components/schemas/procurement.supplier.SourceItem"},"before":{"$ref":"#/components/schemas/procurement.supplier.SourceItem"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}},"type":{"const":"source_items_updated"}}},{"type":"object","title":"source_items_removed","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.supplier.SourceItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.SourceItem"}}}},"type":{"const":"source_items_removed"}}},{"type":"object","title":"offered_items_inserted","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.supplier.draft.OfferedItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.draft.OfferedItem"}}}},"type":{"const":"offered_items_inserted"}}},{"type":"object","title":"offered_items_updated","required":["payload","type"],"properties":{"payload":{"description":"Wraps a list of before/after pairs for `*Updated` payloads.","type":"object","title":"procurement.ItemChangesSnapshot<procurement.supplier.draft.OfferedItem>","required":["changes"],"properties":{"changes":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"procurement.ItemChangeSnapshot<procurement.supplier.draft.OfferedItem>","required":["after","before","id"],"properties":{"after":{"$ref":"#/components/schemas/procurement.supplier.draft.OfferedItem"},"before":{"$ref":"#/components/schemas/procurement.supplier.draft.OfferedItem"},"id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}},"type":{"const":"offered_items_updated"}}},{"type":"object","title":"offered_items_removed","required":["payload","type"],"properties":{"payload":{"description":"Wraps the items list for `*Inserted` / `*Removed` payloads.","type":"object","title":"procurement.ItemsSnapshot<procurement.supplier.draft.OfferedItem>","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.draft.OfferedItem"}}}},"type":{"const":"offered_items_removed"}}},{"type":"object","title":"delivery_date_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.DeliveryDateUpdatedSnapshot"},"type":{"const":"delivery_date_updated"}}},{"type":"object","title":"total_trade_price_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.TotalTradePriceUpdatedSnapshot"},"type":{"const":"total_trade_price_updated"}}},{"type":"object","title":"total_shipping_price_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.TotalShippingPriceUpdatedSnapshot"},"type":{"const":"total_shipping_price_updated"}}},{"type":"object","title":"total_shipping_price_removed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.TotalShippingPriceRemovedSnapshot"},"type":{"const":"total_shipping_price_removed"}}},{"type":"object","title":"supplier_reference_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.SupplierReferenceUpdatedSnapshot"},"type":{"const":"supplier_reference_updated"}}},{"type":"object","title":"supplier_metadata_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.SupplierMetadataUpdatedSnapshot"},"type":{"const":"supplier_metadata_updated"}}},{"type":"object","title":"request_snapshot_reference_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.RequestSnapshotReferenceInsertedSnapshot"},"type":{"const":"request_snapshot_reference_inserted"}}},{"type":"object","title":"supply_snapshot_reference_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.SupplySnapshotReferenceInsertedSnapshot"},"type":{"const":"supply_snapshot_reference_inserted"}}},{"type":"object","title":"supply_snapshot_reference_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.SupplySnapshotReferenceUpdatedSnapshot"},"type":{"const":"supply_snapshot_reference_updated"}}},{"type":"object","title":"user_viewed","required":["payload","type"],"properties":{"payload":{"type":"object","title":"user_viewed","properties":{}},"type":{"const":"user_viewed"}}},{"type":"object","title":"note_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.NoteInsertedSnapshot"},"type":{"const":"note_inserted"}}},{"type":"object","title":"note_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.NoteUpdatedSnapshot"},"type":{"const":"note_updated"}}},{"type":"object","title":"note_removed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.NoteRemovedSnapshot"},"type":{"const":"note_removed"}}},{"type":"object","title":"assignees_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.AssigneesInsertedSnapshot"},"type":{"const":"assignees_inserted"}}},{"type":"object","title":"assignees_removed","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.AssigneesRemovedSnapshot"},"type":{"const":"assignees_removed"}}},{"type":"object","title":"stock_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.StockUpdatedPayload"},"type":{"const":"stock_updated"}}},{"type":"object","title":"files_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.FilesUpdated"},"type":{"const":"files_updated"}}},{"type":"object","title":"shipment_inserted","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ShipmentInsertedSnapshot"},"type":{"const":"shipment_inserted"}}},{"type":"object","title":"shipment_status_updated","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ShipmentStatusUpdatedSnapshot"},"type":{"const":"shipment_status_updated"}}},{"type":"object","title":"claim_created","required":["payload","type"],"properties":{"payload":{"$ref":"#/components/schemas/procurement.ClaimCreatedPayload"},"type":{"const":"claim_created"}}}]},"procurement.supplier.IngestIssue":{"oneOf":[{"description":"The sellable entity itself failed to ingest.","type":"object","title":"sellable","required":["identity","issue","scope"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableIssue"},"scope":{"const":"sellable"}}},{"description":"One of the sellable's inventory entries failed.","type":"object","title":"inventory","required":["identity","issue","scope","sellable"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableInventoryIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableInventoryIssue"},"scope":{"const":"inventory"},"sellable":{"$ref":"#/components/schemas/ingest.SellableIdentity"}}},{"description":"One of the sellable's assembly-grouping entries failed (typically a\nchild sku that doesn't yet exist, or one that the supplier isn't\nallowed to reference).","type":"object","title":"grouping","required":["identity","issue","scope","sellable"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableGroupingIdentity"},"issue":{"$ref":"#/components/schemas/ingest.SellableGroupingIssue"},"scope":{"const":"grouping"},"sellable":{"$ref":"#/components/schemas/ingest.SellableIdentity"}}}]},"procurement.supplier.InlineNote":{"description":"A single note in a bundled-save `notes` block.","type":"object","title":"procurement.supplier.InlineNote","required":["content","visibility"],"properties":{"content":{"$ref":"#/components/schemas/std.string.String"},"visibility":{"$ref":"#/components/schemas/procurement.supplier.NoteVisibility"}}},"procurement.supplier.InventoryError":{"oneOf":[{"description":"An `InventoryInput::Existing` named a `stock_location_id` that is\nnot one of the addresses where the referenced sellable currently\nholds inventory. The supplier may fulfill from any of their sites\nwhere the sellable exists, but not from a site where it doesn't.","type":"object","title":"sellable_not_at_site","required":["available_site_ids","sellable_id","supplied_site_id","type"],"properties":{"available_site_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"sellable_id":{"$ref":"#/components/schemas/std.string.String"},"supplied_site_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"sellable_not_at_site"}}},{"description":"One or more sellables failed during the `sellables.ingest` call.\nCarries every per-entity and per-relation issue surfaced by the\ningestor, not just the first one — atomicity rollbacks are included\nonly when no real failure was reported anywhere in the batch.","type":"object","title":"sellable_ingest_issues","required":["issues","type"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.IngestIssue"}},"type":{"const":"sellable_ingest_issues"}}},{"description":"Ingest succeeded but did not return a UUID for a created sellable.\nThis shouldn't normally happen — it indicates a bug or schema drift\nin the ingest pipeline.","type":"object","title":"sellable_ingest_missing_id","required":["identity","type"],"properties":{"identity":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"type":{"const":"sellable_ingest_missing_id"}}},{"description":"An `InventoryInput::Existing` referenced a sellable with a sku that\ndiffers from the one stored on the sellable. Sku changes via Update\nare not supported — submit `InventoryInput::New` instead.","type":"object","title":"cannot_change_sku","required":["current_sku","sellable_id","supplied_sku","type"],"properties":{"current_sku":{"$ref":"#/components/schemas/std.string.String"},"sellable_id":{"$ref":"#/components/schemas/std.string.String"},"supplied_sku":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"cannot_change_sku"}}},{"description":"An `InventoryInput::Existing` referenced a sellable_id that does not\nexist (or is not visible to this supplier).","type":"object","title":"sellable_not_found","required":["sellable_id","type"],"properties":{"sellable_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"sellable_not_found"}}},{"description":"Two assemblies in the same submission listed the same sellable as a\nchild. A sellable belongs to exactly one assembly, so the request cannot\nbe satisfied as written — drop the child from one of the assemblies, or\noffer a separate sellable for it.\n\nReported on the first conflict found, so the two parents named are the\nfirst assembly to claim the child and the one that collided with it;\nthere may be further conflicts behind them.","type":"object","title":"assembly_child_has_conflicting_parents","required":["child","conflicting_parent","parent","type"],"properties":{"child":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"conflicting_parent":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"parent":{"$ref":"#/components/schemas/ingest.SellableIdentity"},"type":{"const":"assembly_child_has_conflicting_parents"}}}]},"procurement.supplier.InventoryInput":{"oneOf":[{"type":"object","title":"existing","required":["sellable_id","sku","source"],"properties":{"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sku":{"$ref":"#/components/schemas/std.string.String"},"source":{"const":"existing"},"stock_location_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"tags":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]}}},{"type":"object","title":"new","required":["sku","source","stock_location_id"],"properties":{"sku":{"$ref":"#/components/schemas/std.string.String"},"source":{"const":"new"},"stock_location_id":{"$ref":"#/components/schemas/uuid.Uuid"},"tags":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]}}}]},"procurement.supplier.Note":{"description":"A note on a procurement, viewed from the supplier's perspective.","type":"object","title":"procurement.supplier.Note","required":["actor","content","created_at","id","procurement_id","target","updated_at","visibility"],"properties":{"actor":{"$ref":"#/components/schemas/procurement.Actor"},"content":{"$ref":"#/components/schemas/std.string.String"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"},"target":{"description":"What this note is attached to (procurement / source_item / offered_item / event).","$ref":"#/components/schemas/procurement.NoteTarget"},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"visibility":{"$ref":"#/components/schemas/procurement.NoteVisibility"}}},"procurement.supplier.NoteInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"target_not_in_procurement"},{"const":"empty_content"}]},"procurement.supplier.NoteInsertRequest":{"type":"object","title":"procurement.supplier.NoteInsertRequest","required":["content","identity","visibility"],"properties":{"content":{"$ref":"#/components/schemas/std.string.String"},"identity":{"$ref":"#/components/schemas/procurement.Identity"},"target":{"description":"What the note attaches to. Defaults to the procurement as a whole.","$ref":"#/components/schemas/procurement.supplier.NoteTargetInput"},"visibility":{"description":"Who can see this note: `all` (both sides) or `supplier` (own-side only).","$ref":"#/components/schemas/procurement.supplier.NoteVisibility"}}},"procurement.supplier.NoteInsertResponse":{"type":"object","title":"procurement.supplier.NoteInsertResponse","required":["entities","note"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"note":{"$ref":"#/components/schemas/procurement.supplier.Note"}}},"procurement.supplier.NoteListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.supplier.NoteListRequest":{"allOf":[{"$ref":"#/components/schemas/PageRequest"},{"description":"Request to list notes for a procurement (supplier view).","type":"object","title":"procurement.supplier.NoteListRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"},"target":{"description":"Optional filter restricting results to a single target.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.NoteTargetInput"}]}}}]},"procurement.supplier.NoteListResponse":{"type":"object","title":"procurement.supplier.NoteListResponse","required":["entities","notes","pagination"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"notes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.Note"}},"pagination":{"$ref":"#/components/schemas/ForwardPagination"}}},"procurement.supplier.NoteRemoveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"}}}}}]},"procurement.supplier.NoteRemoveRequest":{"type":"object","title":"procurement.supplier.NoteRemoveRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"}}},"procurement.supplier.NoteRemoveResponse":{"type":"object","title":"procurement.supplier.NoteRemoveResponse","properties":{}},"procurement.supplier.NoteTargetInput":{"oneOf":[{"type":"object","title":"procurement","required":["kind"],"properties":{"kind":{"const":"procurement"}}},{"type":"object","title":"source_item","required":["kind","source_item_id"],"properties":{"kind":{"const":"source_item"},"source_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"offered_item","required":["kind","offered_item_id"],"properties":{"kind":{"const":"offered_item"},"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"event","required":["event_id","kind"],"properties":{"event_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"event"}}}]},"procurement.supplier.NoteUpdateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"}}}}},{"const":"empty_content"}]},"procurement.supplier.NoteUpdateRequest":{"type":"object","title":"procurement.supplier.NoteUpdateRequest","required":["content","identity","visibility"],"properties":{"content":{"$ref":"#/components/schemas/std.string.String"},"identity":{"$ref":"#/components/schemas/procurement.NoteIdentity"},"visibility":{"$ref":"#/components/schemas/procurement.supplier.NoteVisibility"}}},"procurement.supplier.NoteUpdateResponse":{"type":"object","title":"procurement.supplier.NoteUpdateResponse","required":["entities","note"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"note":{"$ref":"#/components/schemas/procurement.supplier.Note"}}},"procurement.supplier.NoteVisibility":{"oneOf":[{"const":"all"},{"const":"supplier"}]},"procurement.supplier.Notes":{"description":"Notes created atomically alongside an offer/confirm. Map keys are the\n(client-supplied or existing) item ids in the same request.","type":"object","title":"procurement.supplier.Notes","properties":{"offered_items":{"description":"Notes attached to offered items, keyed by offered_item id (existing or\nclient-supplied via `OfferedItemChange::Insert` in the same request).","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.InlineNote"}}},"procurement":{"description":"Procurement-level notes (`target = procurement`).","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.InlineNote"}},"source_items":{"description":"Notes attached to source items, keyed by source_item id.","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.InlineNote"}}}}},"procurement.supplier.OfferInputError":{"oneOf":[{"type":"object","title":"conflicting_shipping","required":["type"],"properties":{"type":{"const":"conflicting_shipping"}}}]},"procurement.supplier.OfferedItem":{"oneOf":[{"description":"An offered item in a draft status (supplier view).","type":"object","title":"procurement.supplier.draft.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","supplied_offer","type","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.supplier.draft.SuppliedOffer"},"type":{"const":"draft"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}},{"description":"An offered item in a submitted status (supplier view).","type":"object","title":"procurement.supplier.submitted.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","supplied_offer","type","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.supplier.submitted.SuppliedOffer"},"type":{"const":"submitted"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}}]},"procurement.supplier.OfferedItemChange":{"oneOf":[{"type":"object","title":"insert","required":["action","offered_item_id","supplied_offer"],"properties":{"action":{"const":"insert"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"fulfills_source_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplied_offer":{"$ref":"#/components/schemas/procurement.supplier.SuppliedOfferInput"}}},{"type":"object","title":"update","required":["action","offered_item_id","supplied_offer"],"properties":{"action":{"const":"update"},"files":{"description":"Omit to preserve existing files; null or an empty list clears this side's files.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}}]},"fulfills_source_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplied_offer":{"$ref":"#/components/schemas/procurement.supplier.SuppliedOfferInput"}}},{"type":"object","title":"remove","required":["action","offered_item_id"],"properties":{"action":{"const":"remove"},"offered_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"procurement.supplier.OfferedItemError":{"oneOf":[{"type":"object","title":"not_found","required":["offered_item_id","type"],"properties":{"offered_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"not_found"}}},{"description":"An `Insert` supplied an `offered_item_id` that already exists on\nthis procurement.","type":"object","title":"duplicate_id","required":["offered_item_id","type"],"properties":{"offered_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"duplicate_id"}}},{"type":"object","title":"unknown_fulfilled_source","required":["source_item_id","type"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"unknown_fulfilled_source"}}},{"description":"An update tried to switch the item between Product/Assembly/Bundle.","type":"object","title":"offer_type_mismatch","required":["offered_item_id","type"],"properties":{"offered_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"offer_type_mismatch"}}},{"description":"The item is missing a field required to submit the offer;\n`offer_type` / `missing_field` identify which one.","type":"object","title":"not_submittable","required":["missing_field","offer_type","offered_item_id","type"],"properties":{"missing_field":{"$ref":"#/components/schemas/procurement.OfferField"},"offer_type":{"$ref":"#/components/schemas/procurement.OfferType"},"offered_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"not_submittable"}}}]},"procurement.supplier.Procurement":{"allOf":[{"$ref":"#/components/schemas/procurement.supplier.Status"},{"description":"A procurement viewed from the supplier's perspective.\n\nOrganisation, site, and user data is referenced by ID only. Use the\naccompanying [`Entities`] map to resolve full details.","type":"object","title":"procurement.supplier.Procurement","required":["assignees","buyer_business_id","buyer_organization_id","buyer_reference","buyer_shipping_address","buyer_site_id","created_at","currency_code","files","id","initiator","insurer_reference","job_id","job_reference","job_source","latest_edition","rationale","reference","shipment_ids","source_item_ids","supplier_business_id","supplier_metadata","supplier_organization_id","supplier_reference","total_loss_avoidance","total_shipping_price","total_trade_price","updated_at","vehicle","work_provider_contract","work_provider_organization_id"],"properties":{"assignees":{"description":"Users assigned to this procurement (resolve user details via `entities.users`).","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.Assignment"}},"buyer_business_id":{"description":"The ID of the buyer's repairer business (resolve via `entities.businesses`).\nLegacy stopgap; treat as informational only.","$ref":"#/components/schemas/uuid.Uuid"},"buyer_organization_id":{"description":"The ID of the buyer organisation (resolve via `entities.organizations`).","$ref":"#/components/schemas/uuid.Uuid"},"buyer_reference":{"description":"The buyer's own reference number (e.g., purchase order number).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"buyer_shipping_address":{"description":"The buyer's shipping address (snapshot at procurement creation).","$ref":"#/components/schemas/procurement.Address"},"buyer_site_id":{"description":"The ID of the buyer's repairer site (resolve via `entities.businesses`).","$ref":"#/components/schemas/uuid.Uuid"},"claim_ids":{"description":"Claims on this procurement (resolve via `entities.claims`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"created_at":{"description":"When this procurement was created.","type":"string","format":"date-time"},"currency_code":{"description":"The alpha-3 currency code for the transaction (e.g., \"NZD\").","$ref":"#/components/schemas/std.string.String"},"files":{"description":"Procurement-level (general) files. Item-scoped files live on each\nsource/offered item in `entities`.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"id":{"description":"A unique identifier for the procurement.","$ref":"#/components/schemas/uuid.Uuid"},"initiator":{"description":"Who initiated this procurement.","$ref":"#/components/schemas/procurement.ProcurementInitiator"},"insurer_reference":{"description":"The insurer's reference number (e.g., claim number).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_id":{"description":"The job ID from which this procurement originates.","$ref":"#/components/schemas/uuid.Uuid"},"job_reference":{"description":"The job reference from the originating job.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_source":{"description":"The type of job this procurement originates from (bodyshop\nvs. workshop).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.JobSource"}]},"latest_edition":{"description":"Optimistic-concurrency version. Pass it back as `if.matches.edition` on\na mutation to reject the write if the procurement changed in between.\n\nIncrements on every write to the procurement itself and its items —\noffer, confirm, order, request and close. Notes, claims, shipments,\nassignees and events are appended alongside a procurement rather than\ncontended over, so they deliberately leave this untouched: a stable\n`latest_edition` does NOT mean those are unchanged.","$ref":"#/components/schemas/u64"},"note_ids":{"description":"IDs of procurement-level notes (resolve via `entities.notes`). Item-scoped\nnotes live on each source/offered item.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"rationale":{"description":"The reason this supplier received the procurement.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.Rationale"}]},"reference":{"description":"A human-friendly shared reference (e.g., job number + random characters).","$ref":"#/components/schemas/std.string.String"},"shipment_ids":{"description":"IDs of the shipments associated with this procurement (resolve via\n`entities.shipments`). Empty until the order is confirmed, and empty\nwhen the `shipments` group was not requested via `expand`.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"source_item_ids":{"description":"IDs of the source items for this procurement (resolve via `entities.source_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplier_business_id":{"description":"The ID of the supplier business (resolve via `entities.businesses`).","$ref":"#/components/schemas/uuid.Uuid"},"supplier_metadata":{"description":"Supplier-provided key-value metadata for external system correlation.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"supplier_organization_id":{"description":"The ID of the supplier organisation (resolve via `entities.organizations`).","$ref":"#/components/schemas/uuid.Uuid"},"supplier_reference":{"description":"The supplier's own reference number (e.g., invoice or quote number).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_loss_avoidance":{"description":"Whether this procurement is part of a total-loss-avoidance flow.","$ref":"#/components/schemas/bool"},"total_shipping_price":{"description":"The total shipping price.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ShippingPrice"}]},"total_trade_price":{"description":"The total trade price across all offered items (trade_price × quantity).","$ref":"#/components/schemas/std.string.String"},"updated_at":{"description":"When this procurement was last updated.","type":"string","format":"date-time"},"vehicle":{"description":"The vehicle the parts are being procured for.","$ref":"#/components/schemas/procurement.Vehicle"},"work_provider_contract":{"description":"The work provider contract, if applicable.\nSame visibility rules as the organization ID.","oneOf":[{"description":"Null","type":"null"},{"oneOf":[{"const":"hidden","description":"The value is hidden from the current viewer."},{"description":"The value is visible.","type":"object","title":"value<std.string.String>","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/std.string.String"}}}]}]},"work_provider_organization_id":{"description":"The work provider organisation ID, if applicable.\n\n- `None` — no work provider on this procurement.\n- `Some(Hideable::Value(id))` — work provider visible; resolve via `entities.organizations`.\n- `Some(Hideable::Hidden)` — work provider exists but is hidden from this supplier.","oneOf":[{"description":"Null","type":"null"},{"oneOf":[{"const":"hidden","description":"The value is hidden from the current viewer."},{"description":"The value is visible.","type":"object","title":"value<uuid.Uuid>","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/uuid.Uuid"}}}]}]}}}]},"procurement.supplier.ProcurementAssignmentError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"empty_assignees"},{"type":"object","title":"unresolved_assignee","required":["unresolved_assignee"],"properties":{"unresolved_assignee":{"type":"object","title":"unresolved_assignee","required":["user_ids"],"properties":{"user_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}}}]},"procurement.supplier.ProcurementAssignmentInsertRequest":{"type":"object","title":"procurement.supplier.ProcurementAssignmentInsertRequest","required":["identity","user_ids"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"},"user_ids":{"description":"The user IDs to assign.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"procurement.supplier.ProcurementAssignmentListRequest":{"type":"object","title":"procurement.supplier.ProcurementAssignmentListRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"}}},"procurement.supplier.ProcurementAssignmentRemoveRequest":{"type":"object","title":"procurement.supplier.ProcurementAssignmentRemoveRequest","required":["identity","user_ids"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"},"user_ids":{"description":"The user IDs to unassign.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"procurement.supplier.ProcurementAssignmentResponse":{"type":"object","title":"procurement.supplier.ProcurementAssignmentResponse","required":["assignees","entities"],"properties":{"assignees":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.Assignment"}},"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"}}},"procurement.supplier.ProcurementCloseAction":{"oneOf":[{"description":"The supplier declines to fulfil the order/offer.","type":"object","title":"procurement.supplier.ProcurementCloseDeclined","required":["status"],"properties":{"note":{"description":"Optional explanation for the decline.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"const":"offers_requested_decline"}}},{"description":"The supplier declines to fulfil the order/offer.","type":"object","title":"procurement.supplier.ProcurementCloseDeclined","required":["status"],"properties":{"note":{"description":"Optional explanation for the decline.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"const":"offers_sent_decline"}}},{"description":"The supplier declines to fulfil the order/offer.","type":"object","title":"procurement.supplier.ProcurementCloseDeclined","required":["status"],"properties":{"note":{"description":"Optional explanation for the decline.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"const":"order_requested_decline"}}},{"description":"The supplier cancels an already-confirmed order.","type":"object","title":"procurement.supplier.ProcurementCloseCancelled","required":["note","status"],"properties":{"note":{"description":"Mandatory explanation for the cancellation.","$ref":"#/components/schemas/std.string.String"},"status":{"const":"order_confirmed_cancel"}}}]},"procurement.supplier.ProcurementCloseCancelled":{"description":"The supplier cancels an already-confirmed order.","type":"object","title":"procurement.supplier.ProcurementCloseCancelled","required":["note"],"properties":{"note":{"description":"Mandatory explanation for the cancellation.","$ref":"#/components/schemas/std.string.String"}}},"procurement.supplier.ProcurementCloseData":{"type":"object","title":"procurement.supplier.ProcurementCloseData","required":["action","identity"],"properties":{"action":{"description":"The close action & state of the procurement.","$ref":"#/components/schemas/procurement.supplier.ProcurementCloseAction"},"identity":{"$ref":"#/components/schemas/procurement.Identity"}}},"procurement.supplier.ProcurementCloseDeclined":{"description":"The supplier declines to fulfil the order/offer.","type":"object","title":"procurement.supplier.ProcurementCloseDeclined","properties":{"note":{"description":"Optional explanation for the decline.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.supplier.ProcurementCloseError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"type":"object","title":"edition_conflict","required":["edition_conflict"],"properties":{"edition_conflict":{"type":"object","title":"edition_conflict","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}}]},"procurement.supplier.ProcurementCloseResponse":{"type":"object","title":"procurement.supplier.ProcurementCloseResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.supplier.Procurement"}}},"procurement.supplier.ProcurementConfirmData":{"type":"object","title":"procurement.supplier.ProcurementConfirmData","required":["identity"],"properties":{"delivery":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.DeliveryOverride"}]},"files":{"description":"Supplier-attributed procurement-level files.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}}]},"identity":{"$ref":"#/components/schemas/procurement.Identity"},"notes":{"$ref":"#/components/schemas/procurement.supplier.Notes"},"offered_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.OfferedItemChange"}},"source_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.SourceItemChange"}},"supplier_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"supplier_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.TotalShippingPriceInput"}]}}},"procurement.supplier.ProcurementConfirmError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"unknown_note_target","required":["unknown_note_target"],"properties":{"unknown_note_target":{"type":"object","title":"unknown_note_target","required":["item_id"],"properties":{"item_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"type":"object","title":"input","required":["input"],"properties":{"input":{"$ref":"#/components/schemas/procurement.supplier.OfferInputError"}}},{"type":"object","title":"source_item","required":["source_item"],"properties":{"source_item":{"$ref":"#/components/schemas/procurement.supplier.SourceItemError"}}},{"type":"object","title":"offered_item","required":["offered_item"],"properties":{"offered_item":{"$ref":"#/components/schemas/procurement.supplier.OfferedItemError"}}},{"type":"object","title":"inventory","required":["inventory"],"properties":{"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryError"}}},{"type":"object","title":"note","required":["note"],"properties":{"note":{"$ref":"#/components/schemas/procurement.NoteInputError"}}},{"type":"object","title":"edition_conflict","required":["edition_conflict"],"properties":{"edition_conflict":{"type":"object","title":"edition_conflict","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}}]},"procurement.supplier.ProcurementConfirmResponse":{"type":"object","title":"procurement.supplier.ProcurementConfirmResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.supplier.Procurement"}}},"procurement.supplier.ProcurementCountError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"procurement.supplier.ProcurementCountRequest":{"description":"Request for `supplier.procurements.count`. Carries no filters: the endpoint\nalways reports this supplier's full outstanding work queue and what is\nassigned to the requesting user.","type":"object","title":"procurement.supplier.ProcurementCountRequest","properties":{}},"procurement.supplier.ProcurementCountResponse":{"description":"Response for `supplier.procurements.count`: the supplier's outstanding work\nbroken down by status, plus how much of it is assigned to the requesting\nuser.","type":"object","title":"procurement.supplier.ProcurementCountResponse","required":["assigned_to_me","status"],"properties":{"assigned_to_me":{"description":"Procurements assigned to the requesting user. Zero for non-user callers\n(integration / service tokens).","$ref":"#/components/schemas/i64"},"status":{"$ref":"#/components/schemas/procurement.supplier.ProcurementStatusCounts"}}},"procurement.supplier.ProcurementGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"procurement.supplier.ProcurementGetRequest":{"type":"object","title":"procurement.supplier.ProcurementGetRequest","required":["identity"],"properties":{"identity":{"$ref":"#/components/schemas/procurement.Identity"}}},"procurement.supplier.ProcurementGetResponse":{"type":"object","title":"procurement.supplier.ProcurementGetResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.supplier.Procurement"}}},"procurement.supplier.ProcurementInsertedSnapshot":{"description":"Procurement insert snapshot visible to the supplier.","type":"object","title":"procurement.supplier.ProcurementInsertedSnapshot","required":["buyer_business_id","buyer_org_id","buyer_site_address","buyer_site_id","currency_code","deliver_after","files","initiator","insurer_reference","job_id","job_reference","rationale","reference","status","supplier_business_id","supplier_metadata","supplier_org_id","supplier_reference","total_shipping_price","vehicle","work_provider_contract","work_provider_org_id"],"properties":{"buyer_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"buyer_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"buyer_site_address":{"$ref":"#/components/schemas/procurement.Address"},"buyer_site_id":{"$ref":"#/components/schemas/uuid.Uuid"},"currency_code":{"$ref":"#/components/schemas/std.string.String"},"deliver_after":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"initiator":{"$ref":"#/components/schemas/procurement.ProcurementInitiator"},"insurer_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"rationale":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.Rationale"}]},"reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"},"supplier_business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"supplier_org_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle":{"$ref":"#/components/schemas/procurement.Vehicle"},"work_provider_contract":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"work_provider_org_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"procurement.supplier.ProcurementOfferData":{"type":"object","title":"procurement.supplier.ProcurementOfferData","required":["identity"],"properties":{"delivery":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.DeliveryOverride"}]},"files":{"description":"Supplier-attributed procurement-level files.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}}]},"identity":{"$ref":"#/components/schemas/procurement.Identity"},"notes":{"$ref":"#/components/schemas/procurement.supplier.Notes"},"offered_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.OfferedItemChange"}},"source_items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.SourceItemChange"}},"supplier_metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}]},"supplier_reference":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"total_shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.TotalShippingPriceInput"}]}}},"procurement.supplier.ProcurementOfferError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"unknown_note_target","required":["unknown_note_target"],"properties":{"unknown_note_target":{"type":"object","title":"unknown_note_target","required":["item_id"],"properties":{"item_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}}}},{"type":"object","title":"input","required":["input"],"properties":{"input":{"$ref":"#/components/schemas/procurement.supplier.OfferInputError"}}},{"type":"object","title":"source_item","required":["source_item"],"properties":{"source_item":{"$ref":"#/components/schemas/procurement.supplier.SourceItemError"}}},{"type":"object","title":"offered_item","required":["offered_item"],"properties":{"offered_item":{"$ref":"#/components/schemas/procurement.supplier.OfferedItemError"}}},{"type":"object","title":"inventory","required":["inventory"],"properties":{"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryError"}}},{"type":"object","title":"note","required":["note"],"properties":{"note":{"$ref":"#/components/schemas/procurement.NoteInputError"}}},{"type":"object","title":"edition_conflict","required":["edition_conflict"],"properties":{"edition_conflict":{"type":"object","title":"edition_conflict","required":["actual_edition","expected_edition"],"properties":{"actual_edition":{"$ref":"#/components/schemas/u64"},"expected_edition":{"$ref":"#/components/schemas/u64"}}}}}]},"procurement.supplier.ProcurementOfferResponse":{"type":"object","title":"procurement.supplier.ProcurementOfferResponse","required":["entities","procurement"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"},"procurement":{"$ref":"#/components/schemas/procurement.supplier.Procurement"}}},"procurement.supplier.ProcurementSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"query_too_long","required":["query_too_long"],"properties":{"query_too_long":{"type":"object","title":"query_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"procurement.supplier.ProcurementSearchExpand":{"oneOf":[{"const":"users"},{"const":"source_items"},{"const":"offered_items"},{"const":"shipments"},{"const":"claims"}]},"procurement.supplier.ProcurementSearchRequest":{"type":"object","title":"procurement.supplier.ProcurementSearchRequest","properties":{"assigned_to":{"description":"Restrict to procurements with at least one of these supplier-side\nusers assigned. An empty list is ignored (no filter applied).","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"buyer_organization_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"buyer_site_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"buyer_site_ids":{"description":"Restrict to procurements from any of these buyer sites. Takes\nprecedence over `buyer_site_id`; an empty list falls back to it.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"date_range":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DateRange"}]},"expand":{"description":"Side-loaded entity groups to include in `entities`. Omitted or empty\nloads organizations + businesses only. `source_items` / `offered_items`\nare always loaded with the procurement; selecting them only controls\nwhether they appear in `entities`.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.ProcurementSearchExpand"}}]},"initiator":{"description":"Restrict by initiator type/identity. Variants are combined with OR.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.InitiatorFilter"}}]},"job_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"job_ids":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}]},"job_source":{"description":"Restrict by job source (bodyshop/workshop). An empty or omitted list\napplies no filter.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.JobSource"}}]},"page":{"$ref":"#/components/schemas/procurement.SearchPageRequest"},"query":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.ProcurementStatus"}}]}}},"procurement.supplier.ProcurementSearchResponse":{"allOf":[{"description":"Forward-paginated list plus the total number of items matching the\nrequest, independent of pagination. Use this for endpoints whose\nclients render \"showing N of M\" counts or drive page-number UIs.","type":"object","title":"ForwardPaginatedListWithTotal<procurement.supplier.Procurement>","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.Procurement"}},"pagination":{"$ref":"#/components/schemas/ForwardPaginationWithTotal"}}},{"type":"object","title":"procurement.supplier.ProcurementSearchResponse","required":["entities"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.Entities"}}}]},"procurement.supplier.ProcurementStatusCounts":{"description":"Counts of procurements in the supplier's actionable statuses.","type":"object","title":"procurement.supplier.ProcurementStatusCounts","required":["offers_requested","order_requested"],"properties":{"offers_requested":{"description":"Procurements awaiting an offer from this supplier.","$ref":"#/components/schemas/i64"},"order_requested":{"description":"Procurements where the buyer has requested an order.","$ref":"#/components/schemas/i64"}}},"procurement.supplier.ShipmentDispatchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["shipment_id"],"properties":{"shipment_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_status","required":["invalid_status"],"properties":{"invalid_status":{"type":"object","title":"invalid_status","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/procurement.ShipmentStatus"}}}}}]},"procurement.supplier.ShipmentDispatchRequest":{"type":"object","title":"procurement.supplier.ShipmentDispatchRequest","required":["shipment_id"],"properties":{"shipment_id":{"description":"The shipment to dispatch (resolve via `entities.shipments` /\n`supplier.shipments.search`).","$ref":"#/components/schemas/uuid.Uuid"}}},"procurement.supplier.ShipmentDispatchResponse":{"type":"object","title":"procurement.supplier.ShipmentDispatchResponse","required":["entities","shipment"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.ShipmentEntities"},"shipment":{"$ref":"#/components/schemas/procurement.Shipment"}}},"procurement.supplier.ShipmentEntities":{"description":"Side-loaded entity data for shipment search responses.\n\nEach shipment references its parent procurement by ID; resolve it here.\nProcurements are shallow — their own item entities are not surfaced — but\nthe organisations and businesses they reference (buyer/supplier/work\nprovider) are included so callers can resolve the shipment's parties.","type":"object","title":"procurement.supplier.ShipmentEntities","required":["businesses","organizations","procurements"],"properties":{"businesses":{"description":"Businesses referenced by the procurements (buyer site, buyer business, supplier).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Business"}},"organizations":{"description":"Organisations referenced by the procurements (buyer, supplier, work provider).","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.Organization"}},"procurements":{"description":"Parent procurements referenced by the shipments, keyed by procurement ID.","type":"object","additionalProperties":{"$ref":"#/components/schemas/procurement.supplier.Procurement"}}}},"procurement.supplier.ShipmentSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"query_too_long","required":["query_too_long"],"properties":{"query_too_long":{"type":"object","title":"query_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"procurement.supplier.ShipmentSearchRequest":{"type":"object","title":"procurement.supplier.ShipmentSearchRequest","properties":{"created_date_range":{"description":"Filter by the shipment's created date. Bounds are half-open: `after`\ninclusive, `before` exclusive. Callers resolve presets (today, tomorrow,\ncustom) into concrete UTC bounds.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DateRange"}]},"delivery_date_range":{"description":"Filter by the parent procurement's requested delivery date\n(`deliver_after`). Same half-open bounds as `date_range`. Shipments whose\nparent has no requested delivery date are excluded when this is present.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DateRange"}]},"page":{"description":"Pagination and sort. `order_by` supports `created_at` and\n`deliver_after` (the parent procurement's requested delivery date),\nascending or descending.","$ref":"#/components/schemas/procurement.SearchPageRequest"},"query":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"description":"Filter by shipment status. When present and non-empty, only shipments\nwhose status is one of these are returned.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.ShipmentStatus"}}]}}},"procurement.supplier.ShipmentSearchResponse":{"type":"object","title":"procurement.supplier.ShipmentSearchResponse","required":["entities","items","pagination"],"properties":{"entities":{"$ref":"#/components/schemas/procurement.supplier.ShipmentEntities"},"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.Shipment"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}},"procurement.supplier.ShipmentSummary":{"description":"Minimal shipment summary surfaced alongside a procurement. Resolve from\n`entities.shipments` using IDs from `procurement.shipment_ids`.","type":"object","title":"procurement.supplier.ShipmentSummary","required":["id","status"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"status":{"$ref":"#/components/schemas/procurement.ShipmentStatus"}}},"procurement.supplier.SourceItem":{"allOf":[{"$ref":"#/components/schemas/procurement.supplier.SourcePartState"},{"description":"A source item with its current state.","type":"object","title":"procurement.supplier.SourceItem","required":["created_at","files","id","updated_at"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"display_order":{"description":"This item's position in the procurement's list.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this source item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this source item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}}]},"procurement.supplier.SourceItemChange":{"oneOf":[{"description":"Correct a buyer-requested source item with supplier part details.","type":"object","title":"correct","required":["action","reason","source_item_id","supplier_part"],"properties":{"action":{"const":"correct"},"files":{"description":"Omit to preserve existing files; null or an empty list clears this side's files.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}}]},"reason":{"$ref":"#/components/schemas/procurement.CorrectedPartReason"},"source_item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_part":{"$ref":"#/components/schemas/procurement.supplier.SupplierPartInput"}}},{"description":"Mark a buyer-requested source item as removed.","type":"object","title":"remove","required":["action","reason","source_item_id"],"properties":{"action":{"const":"remove"},"reason":{"$ref":"#/components/schemas/procurement.RemovePartReason"},"source_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"Add a new supplier-originated source item. The caller mints `id`\nclient-side so the same submission can reference it from\n`OfferedItemChange::Insert.fulfills_source_ids`.","type":"object","title":"add","required":["action","id","reason","supplier_part"],"properties":{"action":{"const":"add"},"files":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.FileInput"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"reason":{"$ref":"#/components/schemas/procurement.AddPartReason"},"supplier_part":{"$ref":"#/components/schemas/procurement.supplier.SupplierPartInput"}}},{"description":"Revert a corrected/removed source item back to buyer_requested.","type":"object","title":"revert","required":["action","source_item_id"],"properties":{"action":{"const":"revert"},"source_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"description":"Hard-delete — only permitted for supplier-added items.","type":"object","title":"delete","required":["action","source_item_id"],"properties":{"action":{"const":"delete"},"source_item_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"procurement.supplier.SourceItemError":{"oneOf":[{"type":"object","title":"not_found","required":["source_item_id","type"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"not_found"}}},{"type":"object","title":"invalid_transition","required":["from","source_item_id","to","type"],"properties":{"from":{"$ref":"#/components/schemas/procurement.supplier.SourcePartStateTag"},"source_item_id":{"$ref":"#/components/schemas/std.string.String"},"to":{"$ref":"#/components/schemas/procurement.supplier.SourcePartStateTag"},"type":{"const":"invalid_transition"}}},{"type":"object","title":"immutable_buyer_item","required":["source_item_id","type"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"immutable_buyer_item"}}},{"type":"object","title":"cannot_delete_buyer_item","required":["source_item_id","type"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"cannot_delete_buyer_item"}}},{"description":"An `Add` named an `id` that already exists on this procurement.","type":"object","title":"duplicate_id","required":["source_item_id","type"],"properties":{"source_item_id":{"$ref":"#/components/schemas/std.string.String"},"type":{"const":"duplicate_id"}}}]},"procurement.supplier.SourcePartState":{"oneOf":[{"type":"object","title":"buyer_requested","required":["buyer_part","type"],"properties":{"buyer_part":{"$ref":"#/components/schemas/procurement.supplier.BuyerPart"},"type":{"const":"buyer_requested"}}},{"type":"object","title":"supplier_corrected","required":["buyer_part","reason","supplier_part","type"],"properties":{"buyer_part":{"$ref":"#/components/schemas/procurement.supplier.BuyerPart"},"reason":{"$ref":"#/components/schemas/procurement.CorrectedPartReason"},"supplier_part":{"$ref":"#/components/schemas/procurement.supplier.SupplierPart"},"type":{"const":"supplier_corrected"}}},{"type":"object","title":"supplier_removed","required":["buyer_part","reason","type"],"properties":{"buyer_part":{"$ref":"#/components/schemas/procurement.supplier.BuyerPart"},"reason":{"$ref":"#/components/schemas/procurement.RemovePartReason"},"type":{"const":"supplier_removed"}}},{"type":"object","title":"supplier_added","required":["reason","supplier_part","type"],"properties":{"reason":{"$ref":"#/components/schemas/procurement.AddPartReason"},"supplier_part":{"$ref":"#/components/schemas/procurement.supplier.SupplierPart"},"type":{"const":"supplier_added"}}}]},"procurement.supplier.SourcePartStateTag":{"oneOf":[{"const":"buyer"},{"const":"supplier_added"},{"const":"supplier_corrected"},{"const":"supplier_removed"}]},"procurement.supplier.Status":{"oneOf":[{"description":"Offers have been requested from the supplier.","type":"object","title":"offers_requested","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DeliveryDeadline"}]},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"offers_requested"}}},{"description":"The supplier has sent offers back.","type":"object","title":"offers_sent","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DeliveryDeadline"}]},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"offers_sent"}}},{"description":"The buyer has placed an order.","type":"object","title":"order_requested","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.DeliveryDeadline"}]},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"order_requested"}}},{"description":"The supplier has confirmed the order.","type":"object","title":"order_confirmed","required":["delivery","offered_item_ids","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","$ref":"#/components/schemas/procurement.DeliveryDeadline"},"offered_item_ids":{"description":"IDs of items offered to fulfill this procurement (resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"order_confirmed"}}},{"description":"The procurement is being fulfilled off-network (outside the platform).","type":"object","title":"off_network","required":["delivery","status"],"properties":{"delivery":{"description":"When the buyer needs the parts delivered.","$ref":"#/components/schemas/procurement.DeliveryDeadline"},"status":{"const":"off_network"}}},{"description":"The procurement has been closed.","type":"object","title":"closed","required":["offered_item_ids","status"],"properties":{"offered_item_ids":{"description":"IDs of items that were offered (snapshot at close time; resolve via `entities.offered_items`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"status":{"const":"closed"}}}]},"procurement.supplier.SuppliedOfferInput":{"oneOf":[{"type":"object","title":"product","required":["condition","description","inventory","lead_time","part_identity","quantity","return_policy","trade_price","type"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryInput"},"is_oem":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"product"}}},{"type":"object","title":"assembly","required":["condition","description","includes","inventory","lead_time","part_identity","quantity","return_policy","trade_price","type"],"properties":{"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"$ref":"#/components/schemas/std.string.String"},"includes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.AssemblyItemInput"}},"inventory":{"$ref":"#/components/schemas/procurement.supplier.InventoryInput"},"is_oem":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"assembly"}}},{"type":"object","title":"bundle","required":["description","includes","lead_time","return_policy","trade_price","type"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"includes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.BundleItemInput"}},"lead_time":{"$ref":"#/components/schemas/procurement.LeadTime"},"retail_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"return_policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"type":{"const":"bundle"}}}]},"procurement.supplier.SupplierBusinessPublicProfile":{"type":"object","title":"procurement.supplier.SupplierBusinessPublicProfile","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"procurement.supplier.SupplierBusinessSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"query_too_long","required":["query_too_long"],"properties":{"query_too_long":{"type":"object","title":"query_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"procurement.supplier.SupplierBusinessSearchRequest":{"description":"Request for the supplier-scoped buyer business search endpoint.\n\nReturns the distinct list of buyer businesses (sites) that have ever made\na procurement with the calling supplier.","type":"object","title":"procurement.supplier.SupplierBusinessSearchRequest","properties":{"page":{"$ref":"#/components/schemas/PageRequest"},"query":{"description":"Optional substring filter on business name. If empty or whitespace-\nonly, returns an unfiltered alphabetical list.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.supplier.SupplierBusinessSearchResponse":{"type":"object","title":"procurement.supplier.SupplierBusinessSearchResponse","required":["items","pagination"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.SupplierBusinessPublicProfile"}},"pagination":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/ForwardPagination"}]}}},"procurement.supplier.SupplierPart":{"description":"The part details provided by the supplier (correction or addition).","type":"object","title":"procurement.supplier.SupplierPart","required":["description","part_identity","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"}}},"procurement.supplier.SupplierPartInput":{"description":"A supplier part provided as part of a correction or addition.","type":"object","title":"procurement.supplier.SupplierPartInput","required":["description","part_identity","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"part_identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"$ref":"#/components/schemas/u32"}}},"procurement.supplier.TotalShippingPriceInput":{"oneOf":[{"description":"Supplier-provided absolute total shipping price. Per-item shipping\nmust be absent on all offered items when this is set.","type":"object","title":"absolute","required":["type","value"],"properties":{"type":{"const":"absolute"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"derived","required":["type"],"properties":{"type":{"const":"derived"}}}]},"procurement.supplier.draft.AssemblyOffer":{"description":"An assembly offer (draft — all fields optional).","type":"object","title":"procurement.supplier.draft.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.offer.AssemblyItem"}},"inventory":{"description":"The tracked inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.draft.BundleOffer":{"description":"A bundle offer (draft — all fields optional).","type":"object","title":"procurement.supplier.draft.BundleOffer","required":["description","lead_time","pricing","return_policy"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.offer.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"pricing":{"description":"Pricing tiers for the entire bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.draft.OfferedItem":{"description":"An offered item in a draft status (supplier view).","type":"object","title":"procurement.supplier.draft.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","supplied_offer","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.supplier.draft.SuppliedOffer"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}},"procurement.supplier.draft.ProductOffer":{"description":"A single product offer (draft — all fields optional).","type":"object","title":"procurement.supplier.draft.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The tracked inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.draft.SuppliedOffer":{"oneOf":[{"description":"A single product offer (draft — all fields optional).","type":"object","title":"procurement.supplier.draft.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The tracked inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the supplied part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly offer (draft — all fields optional).","type":"object","title":"procurement.supplier.draft.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.offer.AssemblyItem"}},"inventory":{"description":"The tracked inventory reference.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"return_policy":{"description":"The return policy of the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}},{"description":"A bundle offer (draft — all fields optional).","type":"object","title":"procurement.supplier.draft.BundleOffer","required":["description","lead_time","pricing","return_policy","type"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.offer.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.LeadTime"}]},"pricing":{"description":"Pricing tiers for the entire bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"bundle"}}}]},"procurement.supplier.offer.AssemblyItem":{"description":"An item within an assembly offer.\n\nAssembly items inherit pricing, lead time, and return policy from\ntheir parent assembly. They carry only identity, inventory, and\ncondition information.","type":"object","title":"procurement.supplier.offer.AssemblyItem","required":["condition","description","id","inventory","part_identity","quantity"],"properties":{"condition":{"description":"The condition of this item. If absent, the parent assembly's\ncondition applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly item.","$ref":"#/components/schemas/std.string.String"},"id":{"description":"The persisted child row id. Round-trips back as `AssemblyItemInput::id`\non a subsequent `Update` so the existing child row is kept rather than\nre-created.","$ref":"#/components/schemas/uuid.Uuid"},"inventory":{"description":"Inventory reference for this item.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this item within the assembly. Multiplied by the\nparent assembly's quantity for inventory decrement.","$ref":"#/components/schemas/u32"}}},"procurement.supplier.offer.BundleAssembly":{"description":"An assembly within a bundle.","type":"object","title":"procurement.supplier.offer.BundleAssembly","required":["condition","description","includes","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"description":"The condition of this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The parts that make up this assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.offer.AssemblyItem"}},"inventory":{"description":"Inventory reference for this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this assembly within the bundle. Child quantities\nare multiplied by this value.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this assembly. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.offer.BundleItem":{"oneOf":[{"description":"A standalone product within a bundle.","type":"object","title":"procurement.supplier.offer.BundleProduct","required":["condition","description","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the product.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"Inventory reference for this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this product within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this product. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly within a bundle.","type":"object","title":"procurement.supplier.offer.BundleAssembly","required":["condition","description","includes","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The parts that make up this assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.offer.AssemblyItem"}},"inventory":{"description":"Inventory reference for this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this assembly within the bundle. Child quantities\nare multiplied by this value.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this assembly. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}}]},"procurement.supplier.offer.BundleProduct":{"description":"A standalone product within a bundle.","type":"object","title":"procurement.supplier.offer.BundleProduct","required":["condition","description","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"description":"The condition of this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the product.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"Inventory reference for this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.offer.Inventory"}]},"part_identity":{"description":"The part identity (MPN + brand), if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this product within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this product. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.offer.Inventory":{"description":"Inventory reference for a supplied item.","type":"object","title":"procurement.supplier.offer.Inventory","required":["sellable_id","sku","stock_location_id"],"properties":{"sellable_id":{"description":"The sellable ID from the supplier's inventory system.","$ref":"#/components/schemas/uuid.Uuid"},"sku":{"description":"The supplier's SKU for the part.","$ref":"#/components/schemas/std.string.String"},"stock_location_id":{"description":"The supplier's stock location (warehouse/store) ID for this item.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"tags":{"description":"Tags associated with this inventory item.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"procurement.supplier.offer.OfferPricing":{"description":"Pricing fields for a supplied offer.\n\nIncludes per-item shipping which is not visible to buyers.","type":"object","title":"procurement.supplier.offer.OfferPricing","required":["retail_price","shipping_price","trade_price"],"properties":{"retail_price":{"description":"The retail price (RRP).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"description":"Per-item shipping price. May be omitted if shipping is set\nglobally on the procurement via `total_shipping_price`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"description":"The trade price — what the buyer pays.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"procurement.supplier.submitted.AssemblyItem":{"description":"A child item within a submitted assembly offer.\n\nInherits pricing, lead time, and return policy from the parent assembly.","type":"object","title":"procurement.supplier.submitted.AssemblyItem","required":["condition","description","id","inventory","part_identity","quantity"],"properties":{"condition":{"description":"The condition of this item. If absent, the parent assembly's\ncondition applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly item.","$ref":"#/components/schemas/std.string.String"},"id":{"description":"The persisted child row id. Round-trips back as `AssemblyItemInput::id`\non a subsequent `Update` so the existing child row is kept rather than\nre-created.","$ref":"#/components/schemas/uuid.Uuid"},"inventory":{"description":"Inventory reference for this item.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this item within the assembly.","$ref":"#/components/schemas/u32"}}},"procurement.supplier.submitted.AssemblyOffer":{"description":"An assembly offer (submitted).","type":"object","title":"procurement.supplier.submitted.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.submitted.AssemblyItem"}},"inventory":{"description":"The tracked inventory reference.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.submitted.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.submitted.BundleAssembly":{"description":"An assembly within a submitted bundle.","type":"object","title":"procurement.supplier.submitted.BundleAssembly","required":["condition","description","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"description":"The condition of this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The parts that make up this assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.submitted.AssemblyItem"}},"inventory":{"description":"Inventory reference for this assembly.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this assembly within the bundle. Child quantities\nare multiplied by this value.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this assembly. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.submitted.BundleItem":{"oneOf":[{"description":"A standalone product within a submitted bundle.","type":"object","title":"procurement.supplier.submitted.BundleProduct","required":["condition","description","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the product.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"Inventory reference for this product.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this product within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this product. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly within a submitted bundle.","type":"object","title":"procurement.supplier.submitted.BundleAssembly","required":["condition","description","inventory","part_identity","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The parts that make up this assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.submitted.AssemblyItem"}},"inventory":{"description":"Inventory reference for this assembly.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this assembly within the bundle. Child quantities\nare multiplied by this value.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this assembly. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}}]},"procurement.supplier.submitted.BundleOffer":{"description":"A bundle offer (submitted — lead time required; return policy optional).","type":"object","title":"procurement.supplier.submitted.BundleOffer","required":["description","lead_time","pricing","return_policy"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.submitted.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"pricing":{"description":"Pricing tiers for the entire bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.submitted.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.submitted.BundleProduct":{"description":"A standalone product within a submitted bundle.","type":"object","title":"procurement.supplier.submitted.BundleProduct","required":["condition","description","inventory","part_identity","quantity","return_policy"],"properties":{"condition":{"description":"The condition of this product.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the product.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"Inventory reference for this product.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"quantity":{"description":"Quantity of this product within the bundle.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"Optional return policy override for this product. If absent,\nthe parent bundle's return policy applies.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.submitted.OfferPricing":{"description":"Pricing fields for a supplied offer (submitted).\n\nIn submitted offers the trade price must eventually be provided.\nUses [`RequiredPricing`] to make a missing value explicit rather\nthan silently absent. Includes per-item shipping which is not\nvisible to buyers.","type":"object","title":"procurement.supplier.submitted.OfferPricing","required":["retail_price","shipping_price","trade_price"],"properties":{"retail_price":{"description":"The retail price (RRP).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_price":{"description":"Per-item shipping price. May be omitted if shipping is set\nglobally on the procurement via `total_shipping_price`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade_price":{"description":"The trade price — what the buyer pays.","$ref":"#/components/schemas/procurement.RequiredPricing"}}},"procurement.supplier.submitted.OfferedItem":{"description":"An offered item in a submitted status (supplier view).","type":"object","title":"procurement.supplier.submitted.OfferedItem","required":["claims","created_at","files","fulfills_source_ids","id","supplied_offer","updated_at"],"properties":{"claims":{"description":"Claim line items attached to this offered item.","$ref":"#/components/schemas/procurement.OfferedItemClaims"},"created_at":{"description":"When this item was created.","type":"string","format":"date-time"},"display_order":{"description":"This offer's position among the procurement's top-level offers.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"files":{"description":"Files attached to this offered item.","type":"array","items":{"$ref":"#/components/schemas/procurement.File"}},"fulfills_source_ids":{"description":"The IDs of source items that this offer fulfills.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"id":{"description":"A unique identifier for the offered item.","$ref":"#/components/schemas/uuid.Uuid"},"note_ids":{"description":"IDs of notes attached to this offered item (resolve via `entities.notes`).","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"supplied_offer":{"description":"The supplied offer.","$ref":"#/components/schemas/procurement.supplier.submitted.SuppliedOffer"},"updated_at":{"description":"When this item was last updated.","type":"string","format":"date-time"}}},"procurement.supplier.submitted.ProductOffer":{"description":"A single product offer (submitted).","type":"object","title":"procurement.supplier.submitted.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy"],"properties":{"condition":{"description":"The condition of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The tracked inventory reference.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.submitted.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]}}},"procurement.supplier.submitted.SuppliedOffer":{"oneOf":[{"description":"A single product offer (submitted).","type":"object","title":"procurement.supplier.submitted.ProductOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the part.","$ref":"#/components/schemas/std.string.String"},"inventory":{"description":"The tracked inventory reference.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"is_oem":{"description":"Whether the part is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the part is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the part is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the part.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.submitted.OfferPricing"}]},"quantity":{"description":"How many of the part are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the supplied part, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"product"}}},{"description":"An assembly offer (submitted).","type":"object","title":"procurement.supplier.submitted.AssemblyOffer","required":["condition","description","inventory","is_oem","is_oes","lead_time","part_identity","pricing","quantity","return_policy","type"],"properties":{"condition":{"description":"The condition of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartCondition"}]},"description":{"description":"A text description of the assembly.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The child parts of the assembly.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.submitted.AssemblyItem"}},"inventory":{"description":"The tracked inventory reference.","$ref":"#/components/schemas/procurement.supplier.offer.Inventory"},"is_oem":{"description":"Whether the assembly is original equipment manufacturer.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_oes":{"description":"Whether the assembly is original equipment supplier.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"lead_time":{"description":"How long the assembly is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"part_identity":{"description":"The part identity (MPN + brand).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.PartIdentity"}]},"pricing":{"description":"Pricing tiers for the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.submitted.OfferPricing"}]},"quantity":{"description":"How many assemblies are being offered.","$ref":"#/components/schemas/u32"},"return_policy":{"description":"The return policy of the assembly, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"assembly"}}},{"description":"A bundle offer (submitted — lead time required; return policy optional).","type":"object","title":"procurement.supplier.submitted.BundleOffer","required":["description","lead_time","pricing","return_policy","type"],"properties":{"description":{"description":"A text description of the bundle.","$ref":"#/components/schemas/std.string.String"},"includes":{"description":"The products and/or assemblies that make up the bundle.","type":"array","items":{"$ref":"#/components/schemas/procurement.supplier.submitted.BundleItem"}},"lead_time":{"description":"How long the bundle is expected to take to arrive.","$ref":"#/components/schemas/procurement.LeadTime"},"pricing":{"description":"Pricing tiers for the entire bundle.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.supplier.submitted.OfferPricing"}]},"return_policy":{"description":"The return policy of the bundle, if known.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/procurement.ReturnPolicy"}]},"type":{"const":"bundle"}}}]},"procurement.work_provider.EventListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.work_provider.NoteListError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}}]},"procurement.work_provider.ProcurementGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_found","required":["not_found"],"properties":{"not_found":{"type":"object","title":"not_found","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"procurement.work_provider.ProcurementSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_cursor","required":["invalid_cursor"],"properties":{"invalid_cursor":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"query_too_long","required":["query_too_long"],"properties":{"query_too_long":{"type":"object","title":"query_too_long","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"ratings.Error":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"ratings.ListRequest":{"allOf":[{"$ref":"#/components/schemas/ratings.ListRequestKind"},{"type":"object","title":"ratings.ListRequest","properties":{}}]},"ratings.ListRequestKind":{"oneOf":[{"type":"object","title":"repairer","required":["supplier_ids","type"],"properties":{"supplier_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"type":{"const":"repairer"}}},{"type":"object","title":"insurer","required":["repairer_id","supplier_ids","type"],"properties":{"repairer_id":{"$ref":"#/components/schemas/uuid.Uuid"},"supplier_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"type":{"const":"insurer"}}},{"type":"object","title":"supplier","required":["type"],"properties":{"repairer_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"type":{"const":"supplier"}}}]},"ratings.Metric":{"type":"object","title":"ratings.Metric","required":["calculated_at","name","sample_size","value"],"properties":{"calculated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"name":{"$ref":"#/components/schemas/lookup.SupplierMetricKind"},"sample_size":{"$ref":"#/components/schemas/i64"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"ratings.MetricKind":{"oneOf":[{"type":"object","title":"ratings.Metric","required":["calculated_at","name","sample_size","type","value"],"properties":{"calculated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"name":{"$ref":"#/components/schemas/lookup.SupplierMetricKind"},"sample_size":{"$ref":"#/components/schemas/i64"},"type":{"const":"repairer"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"ratings.Metric","required":["calculated_at","name","sample_size","type","value"],"properties":{"calculated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"name":{"$ref":"#/components/schemas/lookup.SupplierMetricKind"},"sample_size":{"$ref":"#/components/schemas/i64"},"type":{"const":"global"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}]},"realtime.PresenceEnterError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"unsupported_resource"}]},"realtime.PresenceEnterRequest":{"type":"object","title":"realtime.PresenceEnterRequest","required":["client_session_id","resource"],"properties":{"client_session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"resource":{"$ref":"#/components/schemas/realtime.ResourceRef"}}},"realtime.PresenceEnterResponse":{"type":"object","title":"realtime.PresenceEnterResponse","required":["expires_at","presence_token"],"properties":{"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"presence_token":{"$ref":"#/components/schemas/uuid.Uuid"}}},"realtime.PresenceEntities":{"description":"Side-loaded entities for a presence response, each map keyed by id.\nEmpty unless the request's `expand` opts the group in — mirrors the\nprocurement `entities` map so the frontend resolves both the same way.","type":"object","title":"realtime.PresenceEntities","required":["users"],"properties":{"users":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/realtime.PresenceUser"}}}},"realtime.PresenceExpand":{"oneOf":[{"const":"users"}]},"realtime.PresenceGetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_resources","required":["too_many_resources"],"properties":{"too_many_resources":{"type":"object","title":"too_many_resources","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"realtime.PresenceGetRequest":{"type":"object","title":"realtime.PresenceGetRequest","required":["resources"],"properties":{"expand":{"description":"Side-loaded entity groups to include in `entities`. Omitted or empty\nloads no entities, so consumers that only need viewer ids pay nothing.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/realtime.PresenceExpand"}}]},"resources":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/realtime.ResourceRef"}}}},"realtime.PresenceGetResponse":{"type":"object","title":"realtime.PresenceGetResponse","required":["entities","generated_at","viewers"],"properties":{"entities":{"$ref":"#/components/schemas/realtime.PresenceEntities"},"generated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"viewers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/realtime.PresenceViewer"}}}},"realtime.PresenceHeartbeatError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"session_not_found"}]},"realtime.PresenceHeartbeatRequest":{"type":"object","title":"realtime.PresenceHeartbeatRequest","required":["client_session_id","presence_token","resource"],"properties":{"client_session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"presence_token":{"$ref":"#/components/schemas/uuid.Uuid"},"resource":{"$ref":"#/components/schemas/realtime.ResourceRef"}}},"realtime.PresenceHeartbeatResponse":{"type":"object","title":"realtime.PresenceHeartbeatResponse","required":["expires_at"],"properties":{"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"realtime.PresenceLeaveError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"realtime.PresenceLeaveRequest":{"type":"object","title":"realtime.PresenceLeaveRequest","required":["client_session_id","presence_token","resource"],"properties":{"client_session_id":{"$ref":"#/components/schemas/uuid.Uuid"},"presence_token":{"$ref":"#/components/schemas/uuid.Uuid"},"resource":{"$ref":"#/components/schemas/realtime.ResourceRef"}}},"realtime.PresenceStreamError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"too_many_resources","required":["too_many_resources"],"properties":{"too_many_resources":{"type":"object","title":"too_many_resources","required":["max"],"properties":{"max":{"$ref":"#/components/schemas/usize"}}}}}]},"realtime.PresenceStreamFrame":{"oneOf":[{"type":"object","title":"snapshot","required":["entities","generated_at","kind","viewers"],"properties":{"entities":{"$ref":"#/components/schemas/realtime.PresenceEntities"},"generated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"snapshot"},"viewers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/realtime.PresenceViewer"}}}},{"type":"object","title":"resource_update","required":["entities","generated_at","kind","resource","viewers"],"properties":{"entities":{"$ref":"#/components/schemas/realtime.PresenceEntities"},"generated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"resource_update"},"resource":{"$ref":"#/components/schemas/realtime.ResourceRef"},"viewers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/realtime.PresenceViewer"}}}},{"type":"object","title":"closed","required":["kind"],"properties":{"kind":{"const":"closed"}}}]},"realtime.PresenceStreamRequest":{"type":"object","title":"realtime.PresenceStreamRequest","required":["resources"],"properties":{"expand":{"description":"Side-loaded entity groups to include in each frame's `entities`.\nOmitted or empty loads no entities.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/realtime.PresenceExpand"}}]},"resources":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/realtime.ResourceRef"}}}},"realtime.PresenceUser":{"description":"A viewer's display identity, side-loaded into [`PresenceEntities`] when\nthe request expands `users`. Keyed by `id` in the entities map; `id` is\nrepeated in the value so a consumer holding a `PresenceUser` alone still\nknows who it is. Only `name` is populated for now.","type":"object","title":"realtime.PresenceUser","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"realtime.PresenceViewer":{"type":"object","title":"realtime.PresenceViewer","required":["client_session_count","expires_at","last_seen_at","resource","viewer_organization_id","viewer_user_id"],"properties":{"client_session_count":{"$ref":"#/components/schemas/i64"},"expires_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"last_seen_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"resource":{"$ref":"#/components/schemas/realtime.ResourceRef"},"viewer_organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"viewer_user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"realtime.ResourceKind":{"oneOf":[{"const":"procurement"},{"const":"conversation"},{"const":"data_qa"}]},"realtime.ResourceRef":{"type":"object","title":"realtime.ResourceRef","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/realtime.ResourceKind"}}},"recommendation_log.Subject":{"oneOf":[{"type":"object","title":"user","required":["kind","user_id"],"properties":{"kind":{"const":"user"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"integration","required":["integration_id","kind"],"properties":{"integration_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"integration"}}},{"type":"object","title":"service","required":["kind","name"],"properties":{"kind":{"const":"service"},"name":{"$ref":"#/components/schemas/std.string.String"}}}]},"recommendation_log.basket.Baskets":{"oneOf":[{"type":"object","title":"recommendation_log.basket.V1","required":["issues","key","outcome","pipelines","policy","preferred_suppliers","rule_id","solutions","version"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.stage.Issue"}},"key":{"$ref":"#/components/schemas/std.string.String"},"outcome":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.stage.Outcome"}]},"pipelines":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Pipeline"}}]},"policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.request.Policy"}]},"preferred_suppliers":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Tier"}}]},"rule_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"solutions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Solution"}},"version":{"const":"v1"}}}]},"recommendation_log.basket.Cover":{"type":"object","title":"recommendation_log.basket.Cover","required":["part","quantity"],"properties":{"part":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u16"}}},"recommendation_log.basket.Fulfillment":{"oneOf":[{"type":"object","title":"complete","required":["kind"],"properties":{"kind":{"const":"complete"}}},{"type":"object","title":"incomplete","required":["kind","uncovered"],"properties":{"kind":{"const":"incomplete"},"uncovered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}]},"recommendation_log.basket.Kind":{"oneOf":[{"type":"object","title":"supplier","required":["kind","supplier"],"properties":{"kind":{"const":"supplier"},"supplier":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}},{"type":"object","title":"general","required":["kind"],"properties":{"kind":{"const":"general"}}}]},"recommendation_log.basket.Line":{"type":"object","title":"recommendation_log.basket.Line","required":["covers","offer","quantity"],"properties":{"covers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Cover"}},"offer":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"$ref":"#/components/schemas/u16"}}},"recommendation_log.basket.Pipeline":{"type":"object","title":"recommendation_log.basket.Pipeline","required":["definition","index"],"properties":{"definition":{"$ref":"#/components/schemas/serde_json.Value"},"index":{"$ref":"#/components/schemas/u32"}}},"recommendation_log.basket.Rank":{"oneOf":[{"const":"best"},{"const":"general"}]},"recommendation_log.basket.Solution":{"type":"object","title":"recommendation_log.basket.Solution","required":["fulfillment","kind","lines","pipeline","rank","totals"],"properties":{"fulfillment":{"$ref":"#/components/schemas/recommendation_log.basket.Fulfillment"},"kind":{"$ref":"#/components/schemas/recommendation_log.basket.Kind"},"lines":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Line"}},"pipeline":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"rank":{"$ref":"#/components/schemas/recommendation_log.basket.Rank"},"totals":{"$ref":"#/components/schemas/recommendation_log.basket.Totals"}}},"recommendation_log.basket.Tier":{"type":"object","title":"recommendation_log.basket.Tier","required":["business_ids"],"properties":{"business_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"recommendation_log.basket.Totals":{"type":"object","title":"recommendation_log.basket.Totals","required":["icop","margin","price","shipping_eta","shipping_price","used_parts"],"properties":{"icop":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"margin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_eta":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"used_parts":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"recommendation_log.basket.V1":{"type":"object","title":"recommendation_log.basket.V1","required":["issues","key","outcome","pipelines","policy","preferred_suppliers","rule_id","solutions"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.stage.Issue"}},"key":{"$ref":"#/components/schemas/std.string.String"},"outcome":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.stage.Outcome"}]},"pipelines":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Pipeline"}}]},"policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.request.Policy"}]},"preferred_suppliers":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Tier"}}]},"rule_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"solutions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.basket.Solution"}}}},"recommendation_log.business.Key":{"type":"object","title":"recommendation_log.business.Key","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"recommendation_log.clearance.Clearance":{"oneOf":[{"type":"object","title":"recommendation_log.clearance.V1","required":["complete_suppliers","job_age_ms","outcome","sensitivity","used_offer","version"],"properties":{"complete_suppliers":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"job_age_ms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"outcome":{"$ref":"#/components/schemas/recommendation_log.clearance.Outcome"},"sensitivity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.clearance.Sensitivity"}]},"used_offer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.clearance.UsedOffer"}]},"version":{"const":"v1"}}}]},"recommendation_log.clearance.Outcome":{"oneOf":[{"const":"cleared"},{"const":"held"}]},"recommendation_log.clearance.Sensitivity":{"oneOf":[{"const":"time_sensitive"},{"const":"cost_sensitive"}]},"recommendation_log.clearance.UsedOffer":{"oneOf":[{"const":"offered"},{"const":"absent"}]},"recommendation_log.clearance.V1":{"type":"object","title":"recommendation_log.clearance.V1","required":["complete_suppliers","job_age_ms","outcome","sensitivity","used_offer"],"properties":{"complete_suppliers":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"job_age_ms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"outcome":{"$ref":"#/components/schemas/recommendation_log.clearance.Outcome"},"sensitivity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.clearance.Sensitivity"}]},"used_offer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.clearance.UsedOffer"}]}}},"recommendation_log.offer.Availability":{"oneOf":[{"type":"object","title":"available","required":["kind"],"properties":{"kind":{"const":"available"}}},{"type":"object","title":"unavailable","required":["kind","reason"],"properties":{"kind":{"const":"unavailable"},"reason":{"$ref":"#/components/schemas/recommendation_log.offer.Reason"}}}]},"recommendation_log.offer.Backorder":{"oneOf":[{"const":"allowed"},{"const":"disallowed"}]},"recommendation_log.offer.Bundle":{"type":"object","title":"recommendation_log.offer.Bundle","required":["id","lines"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"lines":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.offer.BundleLine"}}}},"recommendation_log.offer.BundleLine":{"type":"object","title":"recommendation_log.offer.BundleLine","required":["quantity","unit"],"properties":{"quantity":{"$ref":"#/components/schemas/u32"},"unit":{"$ref":"#/components/schemas/recommendation_log.offer.Unit"}}},"recommendation_log.offer.Catalogued":{"oneOf":[{"const":"existing"},{"const":"created_for_request"}]},"recommendation_log.offer.CostModel":{"oneOf":[{"const":"per_unit"},{"const":"per_purchase"}]},"recommendation_log.offer.Disposition":{"oneOf":[{"type":"object","title":"pooled","required":["kind"],"properties":{"kind":{"const":"pooled"}}},{"type":"object","title":"excluded","required":["kind","reason"],"properties":{"kind":{"const":"excluded"},"reason":{"$ref":"#/components/schemas/recommendation_log.offer.Exclusion"}}}]},"recommendation_log.offer.Exclusion":{"oneOf":[{"const":"unapproved_supplier"},{"const":"not_offered"},{"const":"unlisted"},{"const":"harvest"},{"const":"donor"},{"const":"duplicate"},{"const":"unsupported"},{"const":"superseded"},{"const":"unexpanded"},{"const":"unresolved"}]},"recommendation_log.offer.Group":{"type":"object","title":"recommendation_log.offer.Group","required":["members","part"],"properties":{"members":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.offer.Member"}},"part":{"$ref":"#/components/schemas/std.string.String"}}},"recommendation_log.offer.Inventory":{"oneOf":[{"type":"object","title":"finite","required":["kind","units"],"properties":{"kind":{"const":"finite"},"units":{"$ref":"#/components/schemas/i32"}}},{"type":"object","title":"infinite","required":["kind"],"properties":{"kind":{"const":"infinite"}}}]},"recommendation_log.offer.Item":{"oneOf":[{"type":"object","title":"single","required":["kind","single"],"properties":{"kind":{"const":"single"},"single":{"$ref":"#/components/schemas/recommendation_log.offer.Single"}}},{"type":"object","title":"group","required":["group","kind"],"properties":{"group":{"$ref":"#/components/schemas/recommendation_log.offer.Group"},"kind":{"const":"group"}}}]},"recommendation_log.offer.Key":{"oneOf":[{"type":"object","title":"sellable","required":["kind","product"],"properties":{"kind":{"const":"sellable"},"product":{"$ref":"#/components/schemas/recommendation_log.product.Key"}}},{"type":"object","title":"provisional","required":["kind","part","supplier"],"properties":{"kind":{"const":"provisional"},"part":{"$ref":"#/components/schemas/std.string.String"},"supplier":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}},{"type":"object","title":"bundle","required":["bundle_id","kind","supplier"],"properties":{"bundle_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"bundle"},"supplier":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}},{"type":"object","title":"group","required":["group_id","kind","part","supplier"],"properties":{"group_id":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"group"},"part":{"$ref":"#/components/schemas/std.string.String"},"supplier":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}}]},"recommendation_log.offer.Location":{"type":"object","title":"recommendation_log.offer.Location","required":["backorder","estimated_quantity","quantity","store_address_id"],"properties":{"backorder":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Backorder"}]},"estimated_quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"recommendation_log.offer.Member":{"type":"object","title":"recommendation_log.offer.Member","required":["products","quantity"],"properties":{"products":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.product.Key"}},"quantity":{"$ref":"#/components/schemas/u16"}}},"recommendation_log.offer.Offer":{"oneOf":[{"type":"object","title":"recommendation_log.offer.V1","required":["availability","covers","disposition","item","key","provenance","stock","supplier","terms","version"],"properties":{"availability":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Availability"}]},"covers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.offer.cover.Cover"}},"disposition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Disposition"}]},"item":{"$ref":"#/components/schemas/recommendation_log.offer.Item"},"key":{"$ref":"#/components/schemas/recommendation_log.offer.Key"},"provenance":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Provenance"}]},"stock":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Stock"}]},"supplier":{"$ref":"#/components/schemas/recommendation_log.business.Key"},"terms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Terms"}]},"version":{"const":"v1"}}}]},"recommendation_log.offer.Party":{"oneOf":[{"const":"buyer"},{"const":"supplier"}]},"recommendation_log.offer.Provenance":{"oneOf":[{"type":"object","title":"unobserved","required":["kind"],"properties":{"kind":{"const":"unobserved"}}},{"type":"object","title":"search","required":["kind"],"properties":{"kind":{"const":"search"}}},{"type":"object","title":"procurement","required":["kind"],"properties":{"kind":{"const":"procurement"}}},{"type":"object","title":"offer_request","required":["catalogued","id","kind","note","subject"],"properties":{"catalogued":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Catalogued"}]},"id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"kind":{"const":"offer_request"},"note":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"subject":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Subject"}]}}},{"type":"object","title":"provisional","required":["estimated_margin","estimated_price","kind"],"properties":{"estimated_margin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"estimated_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"kind":{"const":"provisional"}}}]},"recommendation_log.offer.Reason":{"oneOf":[{"const":"sold_out"},{"const":"unpriced"},{"const":"quoted_elsewhere_in_assembly"},{"const":"not_evaluated"}]},"recommendation_log.offer.RestockingFee":{"oneOf":[{"type":"object","title":"fixed","required":["amount","kind"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"fixed"}}},{"type":"object","title":"percentage","required":["kind","max_amount","percent"],"properties":{"kind":{"const":"percentage"},"max_amount":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"percent":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"fixed_and_percentage","required":["amount","kind","max_amount","percent"],"properties":{"amount":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"fixed_and_percentage"},"max_amount":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"percent":{"$ref":"#/components/schemas/std.string.String"}}}]},"recommendation_log.offer.Returns":{"oneOf":[{"type":"object","title":"not_accepted","required":["kind"],"properties":{"kind":{"const":"not_accepted"}}},{"type":"object","title":"accepted","required":["claim_window","kind","min_price","restocking_fee","return_window","shipping_paid_by"],"properties":{"claim_window":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Window"}]},"kind":{"const":"accepted"},"min_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"restocking_fee":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.RestockingFee"}]},"return_window":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Window"}]},"shipping_paid_by":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Party"}]}}},{"type":"object","title":"custom","required":["description","kind"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"custom"}}}]},"recommendation_log.offer.ShippingTime":{"oneOf":[{"type":"object","title":"timed","required":["arrival_time","business_days","eta","kind","store_address_id"],"properties":{"arrival_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"business_days":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"eta":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"timed"},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"untimed","required":["arrival_time","business_days","kind","store_address_id"],"properties":{"arrival_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"business_days":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"kind":{"const":"untimed"},"store_address_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"recommendation_log.offer.Single":{"oneOf":[{"type":"object","title":"unit","required":["kind","unit"],"properties":{"kind":{"const":"unit"},"unit":{"$ref":"#/components/schemas/recommendation_log.offer.Unit"}}},{"type":"object","title":"bundle","required":["bundle","kind"],"properties":{"bundle":{"$ref":"#/components/schemas/recommendation_log.offer.Bundle"},"kind":{"const":"bundle"}}}]},"recommendation_log.offer.Stock":{"type":"object","title":"recommendation_log.offer.Stock","required":["inventory","locations"],"properties":{"inventory":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Inventory"}]},"locations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.offer.Location"}}}},"recommendation_log.offer.Subject":{"oneOf":[{"type":"object","title":"user","required":["kind","user_id"],"properties":{"kind":{"const":"user"},"user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"system","required":["kind"],"properties":{"kind":{"const":"system"}}}]},"recommendation_log.offer.Terms":{"type":"object","title":"recommendation_log.offer.Terms","required":["cost_model","icop","margin","price","returns","shipping_price","shipping_time"],"properties":{"cost_model":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.CostModel"}]},"icop":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"margin":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"returns":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Returns"}]},"shipping_price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"shipping_time":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.ShippingTime"}]}}},"recommendation_log.offer.Unit":{"oneOf":[{"type":"object","title":"sellable","required":["kind","product"],"properties":{"kind":{"const":"sellable"},"product":{"$ref":"#/components/schemas/recommendation_log.product.Key"}}},{"type":"object","title":"provisional","required":["kind","part"],"properties":{"kind":{"const":"provisional"},"part":{"$ref":"#/components/schemas/std.string.String"}}}]},"recommendation_log.offer.V1":{"type":"object","title":"recommendation_log.offer.V1","required":["availability","covers","disposition","item","key","provenance","stock","supplier","terms"],"properties":{"availability":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Availability"}]},"covers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.offer.cover.Cover"}},"disposition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Disposition"}]},"item":{"$ref":"#/components/schemas/recommendation_log.offer.Item"},"key":{"$ref":"#/components/schemas/recommendation_log.offer.Key"},"provenance":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Provenance"}]},"stock":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Stock"}]},"supplier":{"$ref":"#/components/schemas/recommendation_log.business.Key"},"terms":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Terms"}]}}},"recommendation_log.offer.Window":{"oneOf":[{"type":"object","title":"days","required":["count","kind"],"properties":{"count":{"$ref":"#/components/schemas/u16"},"kind":{"const":"days"}}},{"type":"object","title":"until","required":["date","kind"],"properties":{"date":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"kind":{"const":"until"}}}]},"recommendation_log.offer.cover.Cover":{"type":"object","title":"recommendation_log.offer.cover.Cover","required":["disposition","ghca_id","interchange_quantity","part","rrp","verdict"],"properties":{"disposition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.Disposition"}]},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"interchange_quantity":{"$ref":"#/components/schemas/u16"},"part":{"$ref":"#/components/schemas/std.string.String"},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"verdict":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.offer.cover.Verdict"}]}}},"recommendation_log.offer.cover.Issue":{"oneOf":[{"const":"unknown_work_provider"},{"const":"missing_vehicle_registration_date"},{"const":"missing_hca"},{"const":"unexpected_error"}]},"recommendation_log.offer.cover.Verdict":{"oneOf":[{"type":"object","title":"allowed","required":["issues","kind"],"properties":{"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.offer.cover.Issue"}},"kind":{"const":"allowed"}}},{"type":"object","title":"disallowed","required":["kind","reason"],"properties":{"kind":{"const":"disallowed"},"reason":{"$ref":"#/components/schemas/std.string.String"}}}]},"recommendation_log.part.Facts":{"type":"object","title":"recommendation_log.part.Facts","required":["description","ghca_id","identity","rrp"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.part.Identity"}]},"rrp":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"recommendation_log.part.Identity":{"type":"object","title":"recommendation_log.part.Identity","required":["brand_id","mpn"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/recommendation_log.part.Mpn"}}},"recommendation_log.part.Mpn":{"oneOf":[{"type":"object","title":"plain","required":["kind","normalized","original"],"properties":{"kind":{"const":"plain"},"normalized":{"$ref":"#/components/schemas/std.string.String"},"original":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"obfuscated","required":["kind","normalized"],"properties":{"kind":{"const":"obfuscated"},"normalized":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"unrecorded","required":["kind","normalized"],"properties":{"kind":{"const":"unrecorded"},"normalized":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"undeciphered","required":["kind"],"properties":{"kind":{"const":"undeciphered"}}},{"type":"object","title":"unresolved","required":["given","kind"],"properties":{"given":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"unresolved"}}}]},"recommendation_log.part.Part":{"oneOf":[{"type":"object","title":"recommendation_log.part.V1","required":["key","standing","version"],"properties":{"key":{"$ref":"#/components/schemas/std.string.String"},"standing":{"$ref":"#/components/schemas/recommendation_log.part.Standing"},"version":{"const":"v1"}}}]},"recommendation_log.part.Standing":{"oneOf":[{"type":"object","title":"requested","required":["facts","kind"],"properties":{"facts":{"$ref":"#/components/schemas/recommendation_log.part.Facts"},"kind":{"const":"requested"}}},{"type":"object","title":"unrequested","required":["facts","kind","status"],"properties":{"facts":{"$ref":"#/components/schemas/recommendation_log.part.Facts"},"kind":{"const":"unrequested"},"status":{"$ref":"#/components/schemas/recommendation_log.part.Status"}}},{"type":"object","title":"supplier_added","required":["facts","kind","supplier"],"properties":{"facts":{"$ref":"#/components/schemas/recommendation_log.part.Facts"},"kind":{"const":"supplier_added"},"supplier":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}},{"type":"object","title":"absent","required":["kind"],"properties":{"kind":{"const":"absent"}}},{"type":"object","title":"unrecorded","required":["kind"],"properties":{"kind":{"const":"unrecorded"}}}]},"recommendation_log.part.Status":{"oneOf":[{"const":"estimated"},{"const":"ordered"}]},"recommendation_log.part.V1":{"type":"object","title":"recommendation_log.part.V1","required":["key","standing"],"properties":{"key":{"$ref":"#/components/schemas/std.string.String"},"standing":{"$ref":"#/components/schemas/recommendation_log.part.Standing"}}},"recommendation_log.product.AftermarketSource":{"oneOf":[{"const":"oes"},{"const":"independent"}]},"recommendation_log.product.Brand":{"type":"object","title":"recommendation_log.product.Brand","required":["oem","oes"],"properties":{"oem":{"$ref":"#/components/schemas/recommendation_log.product.Oem"},"oes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Oes"}]}}},"recommendation_log.product.Certification":{"oneOf":[{"const":"certified"},{"const":"uncertified"}]},"recommendation_log.product.Condition":{"oneOf":[{"type":"object","title":"new","required":["kind"],"properties":{"kind":{"const":"new"}}},{"type":"object","title":"used","required":["grade","kind"],"properties":{"grade":{"$ref":"#/components/schemas/recommendation_log.product.UsedGrade"},"kind":{"const":"used"}}}]},"recommendation_log.product.Donor":{"type":"object","title":"recommendation_log.product.Donor","required":["chassis","original_chassis"],"properties":{"chassis":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"original_chassis":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"recommendation_log.product.Hca":{"type":"object","title":"recommendation_log.product.Hca","required":["ghca_id","raw"],"properties":{"ghca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"raw":{"$ref":"#/components/schemas/std.string.String"}}},"recommendation_log.product.Key":{"type":"object","title":"recommendation_log.product.Key","required":["business_id","organization_id","sellable_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"sellable_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"recommendation_log.product.Kind":{"oneOf":[{"const":"product"},{"const":"assembly"}]},"recommendation_log.product.Lifecycle":{"type":"object","title":"recommendation_log.product.Lifecycle","required":["archived_at","created_at","expires_at","updated_at"],"properties":{"archived_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"expires_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"recommendation_log.product.ListPrices":{"type":"object","title":"recommendation_log.product.ListPrices","required":["dealer","retail","trade","wholesale"],"properties":{"dealer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"retail":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"trade":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"wholesale":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"recommendation_log.product.Oem":{"oneOf":[{"const":"oem"},{"const":"not_oem"}]},"recommendation_log.product.Oes":{"oneOf":[{"const":"oes"},{"const":"not_oes"}]},"recommendation_log.product.PanelGrade":{"oneOf":[{"const":"grade0"},{"const":"grade_a"},{"const":"grade_b"},{"const":"grade_c"}]},"recommendation_log.product.Product":{"oneOf":[{"type":"object","title":"recommendation_log.product.V1","required":["barcode","brand","brand_id","condition","description","donor","fetched_at","hca","images","key","kind","lifecycle","list_prices","mpn","name","parent","part_type_id","sku","supply_type","tags","version"],"properties":{"barcode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Brand"}]},"brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Condition"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"donor":{"$ref":"#/components/schemas/recommendation_log.product.Donor"},"fetched_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"hca":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Hca"}]},"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"key":{"$ref":"#/components/schemas/recommendation_log.product.Key"},"kind":{"$ref":"#/components/schemas/recommendation_log.product.Kind"},"lifecycle":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Lifecycle"}]},"list_prices":{"$ref":"#/components/schemas/recommendation_log.product.ListPrices"},"mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parent":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Key"}]},"part_type_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sku":{"$ref":"#/components/schemas/std.string.String"},"supply_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.SupplyType"}]},"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.product.Tag"}},"version":{"const":"v1"}}}]},"recommendation_log.product.RecycledGrade":{"oneOf":[{"const":"grade0"},{"const":"grade_a"},{"const":"grade_b"},{"const":"grade_c"},{"const":"remanufactured"}]},"recommendation_log.product.SupplyType":{"oneOf":[{"type":"object","title":"genuine","required":["kind"],"properties":{"kind":{"const":"genuine"}}},{"type":"object","title":"aftermarket","required":["certification","kind","source"],"properties":{"certification":{"$ref":"#/components/schemas/recommendation_log.product.Certification"},"kind":{"const":"aftermarket"},"source":{"$ref":"#/components/schemas/recommendation_log.product.AftermarketSource"}}},{"type":"object","title":"performance_custom","required":["kind"],"properties":{"kind":{"const":"performance_custom"}}},{"type":"object","title":"recycled","required":["grade","kind"],"properties":{"grade":{"$ref":"#/components/schemas/recommendation_log.product.RecycledGrade"},"kind":{"const":"recycled"}}}]},"recommendation_log.product.Tag":{"type":"object","title":"recommendation_log.product.Tag","required":["name","visibility"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"visibility":{"$ref":"#/components/schemas/recommendation_log.product.Visibility"}}},"recommendation_log.product.UsedGrade":{"oneOf":[{"type":"object","title":"panel","required":["grade","kind"],"properties":{"grade":{"$ref":"#/components/schemas/recommendation_log.product.PanelGrade"},"kind":{"const":"panel"}}},{"type":"object","title":"distance_traveled","required":["kilometres","kind"],"properties":{"kilometres":{"$ref":"#/components/schemas/u32"},"kind":{"const":"distance_traveled"}}},{"type":"object","title":"operation_hours","required":["hours","kind"],"properties":{"hours":{"$ref":"#/components/schemas/u32"},"kind":{"const":"operation_hours"}}},{"type":"object","title":"remaining_thickness","required":["kind","millimetres"],"properties":{"kind":{"const":"remaining_thickness"},"millimetres":{"$ref":"#/components/schemas/std.string.String"}}}]},"recommendation_log.product.V1":{"type":"object","title":"recommendation_log.product.V1","required":["barcode","brand","brand_id","condition","description","donor","fetched_at","hca","images","key","kind","lifecycle","list_prices","mpn","name","parent","part_type_id","sku","supply_type","tags"],"properties":{"barcode":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Brand"}]},"brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Condition"}]},"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"donor":{"$ref":"#/components/schemas/recommendation_log.product.Donor"},"fetched_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"hca":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Hca"}]},"images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"key":{"$ref":"#/components/schemas/recommendation_log.product.Key"},"kind":{"$ref":"#/components/schemas/recommendation_log.product.Kind"},"lifecycle":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Lifecycle"}]},"list_prices":{"$ref":"#/components/schemas/recommendation_log.product.ListPrices"},"mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"parent":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.Key"}]},"part_type_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sku":{"$ref":"#/components/schemas/std.string.String"},"supply_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.product.SupplyType"}]},"tags":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.product.Tag"}}}},"recommendation_log.product.Visibility":{"oneOf":[{"const":"public"},{"const":"internal"}]},"recommendation_log.ranking.Outcome":{"oneOf":[{"type":"object","title":"decided","required":["decided_at","decision_id","kind","policy"],"properties":{"decided_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"decision_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"decided"},"policy":{"$ref":"#/components/schemas/recommendation_log.ranking.PolicyRef"}}},{"type":"object","title":"gated","required":["kind"],"properties":{"kind":{"const":"gated"}}},{"type":"object","title":"unbound","required":["kind"],"properties":{"kind":{"const":"unbound"}}},{"type":"object","title":"failed","required":["kind"],"properties":{"kind":{"const":"failed"}}}]},"recommendation_log.ranking.PolicyRef":{"type":"object","title":"recommendation_log.ranking.PolicyRef","required":["binding_id","policy_id","rule_id"],"properties":{"binding_id":{"$ref":"#/components/schemas/uuid.Uuid"},"policy_id":{"$ref":"#/components/schemas/uuid.Uuid"},"rule_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"recommendation_log.ranking.Ranking":{"oneOf":[{"type":"object","title":"recommendation_log.ranking.V1","required":["outcome","version"],"properties":{"outcome":{"$ref":"#/components/schemas/recommendation_log.ranking.Outcome"},"version":{"const":"v1"}}}]},"recommendation_log.ranking.V1":{"type":"object","title":"recommendation_log.ranking.V1","required":["outcome"],"properties":{"outcome":{"$ref":"#/components/schemas/recommendation_log.ranking.Outcome"}}},"recommendation_log.request.Alternative":{"allOf":[{"$ref":"#/components/schemas/recommendation_log.request.Branch"},{"type":"object","title":"recommendation_log.request.Alternative","required":["key"],"properties":{"key":{"$ref":"#/components/schemas/std.string.String"}}}]},"recommendation_log.request.Basket":{"type":"object","title":"recommendation_log.request.Basket","required":["key","policy"],"properties":{"key":{"$ref":"#/components/schemas/std.string.String"},"policy":{"$ref":"#/components/schemas/recommendation_log.request.Policy"}}},"recommendation_log.request.Branch":{"oneOf":[{"type":"object","title":"recommendation_log.request.Line","required":["identity","kind","part","quantity"],"properties":{"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.part.Identity"}]},"kind":{"const":"part"},"part":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"all","required":["all","kind"],"properties":{"all":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.request.Line"}},"kind":{"const":"all"}}}]},"recommendation_log.request.Demand":{"oneOf":[{"type":"object","title":"job","required":["buyer","job_id","kind","site"],"properties":{"buyer":{"$ref":"#/components/schemas/recommendation_log.business.Key"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"job"},"site":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}},{"type":"object","title":"parts","required":["buyer","kind","site"],"properties":{"buyer":{"$ref":"#/components/schemas/recommendation_log.business.Key"},"kind":{"const":"parts"},"site":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}}]},"recommendation_log.request.Fetch":{"type":"object","title":"recommendation_log.request.Fetch","required":["interchange","sources","suppliers"],"properties":{"interchange":{"$ref":"#/components/schemas/recommendation_log.request.Interchange"},"sources":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.request.Source"}},"suppliers":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}]}}},"recommendation_log.request.Interchange":{"type":"object","title":"recommendation_log.request.Interchange","required":["depth","qualifiers"],"properties":{"depth":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"qualifiers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.request.Qualifier"}}}},"recommendation_log.request.Limits":{"type":"object","title":"recommendation_log.request.Limits","required":["timeout"],"properties":{"timeout":{"$ref":"#/components/schemas/recommendation_log.request.Timeout"}}},"recommendation_log.request.Line":{"type":"object","title":"recommendation_log.request.Line","required":["identity","part","quantity"],"properties":{"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.part.Identity"}]},"part":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u32"}}},"recommendation_log.request.Listing":{"oneOf":[{"const":"every_site"},{"const":"first_site"}]},"recommendation_log.request.Need":{"oneOf":[{"type":"object","title":"recommendation_log.request.Line","required":["identity","kind","part","quantity"],"properties":{"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.part.Identity"}]},"kind":{"const":"part"},"part":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"any","required":["any","kind"],"properties":{"any":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.request.Alternative"}},"kind":{"const":"any"}}}]},"recommendation_log.request.Plan":{"type":"object","title":"recommendation_log.request.Plan","required":["assess","baskets","fetch","listing","price","rank","through"],"properties":{"assess":{"$ref":"#/components/schemas/recommendation_log.request.Rules"},"baskets":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.request.Basket"}},"fetch":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.request.Fetch"}]},"listing":{"$ref":"#/components/schemas/recommendation_log.request.Listing"},"price":{"$ref":"#/components/schemas/recommendation_log.request.Rules"},"rank":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.request.Ranking"}]},"through":{"$ref":"#/components/schemas/recommendation_log.stage.Stage"}}},"recommendation_log.request.Policy":{"oneOf":[{"type":"object","title":"resolved","required":["kind"],"properties":{"kind":{"const":"resolved"}}},{"type":"object","title":"stored","required":["id","kind"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"const":"stored"}}},{"type":"object","title":"inline","required":["kind"],"properties":{"kind":{"const":"inline"}}}]},"recommendation_log.request.Qualifier":{"oneOf":[{"const":"exact_replacement"},{"const":"alternate_finish"},{"const":"usable"},{"const":"supersedes"}]},"recommendation_log.request.Ranking":{"type":"object","title":"recommendation_log.request.Ranking","required":["policy"],"properties":{"policy":{"$ref":"#/components/schemas/recommendation_log.request.Policy"}}},"recommendation_log.request.Request":{"oneOf":[{"type":"object","title":"recommendation_log.request.V1","required":["deliver_before","demand","limits","plan","requirements","version"],"properties":{"deliver_before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"demand":{"$ref":"#/components/schemas/recommendation_log.request.Demand"},"limits":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.request.Limits"}]},"plan":{"$ref":"#/components/schemas/recommendation_log.request.Plan"},"requirements":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.request.Requirement"}},"version":{"const":"v1"}}}]},"recommendation_log.request.Requirement":{"allOf":[{"$ref":"#/components/schemas/recommendation_log.request.Need"},{"type":"object","title":"recommendation_log.request.Requirement","required":["key"],"properties":{"key":{"$ref":"#/components/schemas/std.string.String"}}}]},"recommendation_log.request.Rules":{"oneOf":[{"type":"object","title":"resolved","required":["kind"],"properties":{"kind":{"const":"resolved"}}}]},"recommendation_log.request.Source":{"oneOf":[{"const":"quoted"},{"const":"catalog"},{"const":"donor"},{"const":"provisional"}]},"recommendation_log.request.Timeout":{"oneOf":[{"type":"object","title":"default","required":["effective_ms","kind"],"properties":{"effective_ms":{"$ref":"#/components/schemas/u64"},"kind":{"const":"default"}}},{"type":"object","title":"within","required":["kind","ms"],"properties":{"kind":{"const":"within"},"ms":{"$ref":"#/components/schemas/u64"}}},{"type":"object","title":"unbounded","required":["effective_ms","kind"],"properties":{"effective_ms":{"$ref":"#/components/schemas/u64"},"kind":{"const":"unbounded"}}}]},"recommendation_log.request.V1":{"type":"object","title":"recommendation_log.request.V1","required":["deliver_before","demand","limits","plan","requirements"],"properties":{"deliver_before":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"demand":{"$ref":"#/components/schemas/recommendation_log.request.Demand"},"limits":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.request.Limits"}]},"plan":{"$ref":"#/components/schemas/recommendation_log.request.Plan"},"requirements":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.request.Requirement"}}}},"recommendation_log.stage.Failure":{"oneOf":[{"const":"unscheduled"},{"const":"closed"},{"const":"panicked"},{"const":"aborted"}]},"recommendation_log.stage.Issue":{"oneOf":[{"type":"object","title":"truncated","required":["kind","step"],"properties":{"kind":{"const":"truncated"},"step":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"pipeline","required":["failure","index","kind"],"properties":{"failure":{"$ref":"#/components/schemas/recommendation_log.stage.Failure"},"index":{"$ref":"#/components/schemas/u32"},"kind":{"const":"pipeline"}}},{"type":"object","title":"ranker","required":["kind"],"properties":{"kind":{"const":"ranker"}}}]},"recommendation_log.stage.Outcome":{"oneOf":[{"const":"complete"},{"const":"partial"},{"const":"failed"},{"const":"blocked"}]},"recommendation_log.stage.Settled":{"oneOf":[{"type":"object","title":"recommendation_log.stage.V1","required":["blocked_on","elapsed_ms","issues","outcome","stage","version"],"properties":{"blocked_on":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.stage.Stage"}]},"elapsed_ms":{"$ref":"#/components/schemas/u64"},"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.stage.Issue"}},"outcome":{"$ref":"#/components/schemas/recommendation_log.stage.Outcome"},"stage":{"$ref":"#/components/schemas/recommendation_log.stage.Stage"},"version":{"const":"v1"}}}]},"recommendation_log.stage.Stage":{"oneOf":[{"const":"search"},{"const":"price"},{"const":"assess"},{"const":"basket"},{"const":"rank"}]},"recommendation_log.stage.V1":{"type":"object","title":"recommendation_log.stage.V1","required":["blocked_on","elapsed_ms","issues","outcome","stage"],"properties":{"blocked_on":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.stage.Stage"}]},"elapsed_ms":{"$ref":"#/components/schemas/u64"},"issues":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.stage.Issue"}},"outcome":{"$ref":"#/components/schemas/recommendation_log.stage.Outcome"},"stage":{"$ref":"#/components/schemas/recommendation_log.stage.Stage"}}},"recommendation_log.supplier.Approval":{"oneOf":[{"type":"object","title":"recommendation_log.supplier.Profile","required":["kind","name","network","ordering","store_locations","supplied_makes","supply_types"],"properties":{"kind":{"const":"approved"},"name":{"$ref":"#/components/schemas/std.string.String"},"network":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.supplier.Network"}]},"ordering":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.supplier.Ordering"}]},"store_locations":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.supplier.Location"}}]},"supplied_makes":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"supply_types":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.supplier.SupplyType"}}]}}},{"type":"object","title":"unapproved","required":["kind"],"properties":{"kind":{"const":"unapproved"}}}]},"recommendation_log.supplier.Authorization":{"oneOf":[{"const":"authorized"},{"const":"unauthorized"}]},"recommendation_log.supplier.Location":{"type":"object","title":"recommendation_log.supplier.Location","required":["latitude","longitude"],"properties":{"latitude":{"$ref":"#/components/schemas/std.string.String"},"longitude":{"$ref":"#/components/schemas/std.string.String"}}},"recommendation_log.supplier.Network":{"oneOf":[{"const":"on"},{"const":"off"}]},"recommendation_log.supplier.Ordering":{"oneOf":[{"const":"provisional"},{"const":"standard"}]},"recommendation_log.supplier.Profile":{"type":"object","title":"recommendation_log.supplier.Profile","required":["name","network","ordering","store_locations","supplied_makes","supply_types"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"network":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.supplier.Network"}]},"ordering":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/recommendation_log.supplier.Ordering"}]},"store_locations":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.supplier.Location"}}]},"supplied_makes":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"supply_types":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/recommendation_log.supplier.SupplyType"}}]}}},"recommendation_log.supplier.Supplier":{"oneOf":[{"type":"object","title":"recommendation_log.supplier.V1","required":["approval","key","version"],"properties":{"approval":{"$ref":"#/components/schemas/recommendation_log.supplier.Approval"},"key":{"$ref":"#/components/schemas/recommendation_log.business.Key"},"version":{"const":"v1"}}}]},"recommendation_log.supplier.SupplyType":{"oneOf":[{"type":"object","title":"oem","required":["authorization","kind"],"properties":{"authorization":{"$ref":"#/components/schemas/recommendation_log.supplier.Authorization"},"kind":{"const":"oem"}}},{"type":"object","title":"oes","required":["kind"],"properties":{"kind":{"const":"oes"}}},{"type":"object","title":"aftermarket","required":["kind"],"properties":{"kind":{"const":"aftermarket"}}},{"type":"object","title":"used","required":["kind"],"properties":{"kind":{"const":"used"}}}]},"recommendation_log.supplier.V1":{"type":"object","title":"recommendation_log.supplier.V1","required":["approval","key"],"properties":{"approval":{"$ref":"#/components/schemas/recommendation_log.supplier.Approval"},"key":{"$ref":"#/components/schemas/recommendation_log.business.Key"}}},"reflectapi_ex.empty.Empty":{"description":"Empty payload for a no-data variant of an adjacently-tagged (`content = \"...\"`) reflectapi enum.\n\nserde serializes a zero-field *struct* variant (`Variant {}`) with its content present as an\nempty object (`{\"type\":\"variant\",\"value\":{}}`), but reflectapi's Rust codegen collapses such a\nvariant to a *unit* variant, which then rejects the `value` map on deserialization\n(`invalid type: map, expected unit variant`). Wrapping the payload in this named empty struct\n(`Variant(Empty)`) makes the variant genuinely content-bearing, so both the Rust and TS codegens\nemit content for it and the wire form (`value:{}`) is unchanged.\n\nPrefer this over `reflectapi::Empty` when the containing enum derives `Copy`/`Hash` —\n`reflectapi::Empty` derives neither.","type":"object","title":"reflectapi_ex.empty.Empty","properties":{}},"remote_file_provider.UploadFileMimeType":{"oneOf":[{"const":"pdf"},{"const":"png"},{"const":"gif"},{"const":"jpeg"},{"const":"web_p"},{"const":"json"},{"const":"octet_stream"}]},"repairer_jobs_parts_verify.Request":{"type":"object","title":"repairer_jobs_parts_verify.Request","required":["job_id"],"properties":{"job_id":{"description":"The job whose stored parts should be verified.","$ref":"#/components/schemas/uuid.Uuid"}}},"repairer_jobs_parts_verify.Response":{"type":"object","title":"repairer_jobs_parts_verify.Response","required":["parts"],"properties":{"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/parts_verification.PartVerification"}}}},"rules_engine.input.Rule":{"type":"object","title":"rules_engine.input.Rule","required":["name","outputs"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"outputs":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"preconditions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"rules_engine.output.Rule":{"type":"object","title":"rules_engine.output.Rule","required":["name","outputs","preconditions"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"outputs":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"preconditions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"rules_engine_rs_v2.ExpressionFailure":{"description":"A single zen expression that failed to parse during policy validation.","type":"object","title":"rules_engine_rs_v2.ExpressionFailure","required":["error","expression","kind","rule_index","rule_name"],"properties":{"error":{"description":"The parse error from the zen engine.","$ref":"#/components/schemas/std.string.String"},"expression":{"description":"The zen expression that failed to parse.","$ref":"#/components/schemas/std.string.String"},"kind":{"description":"Whether this is a precondition or output expression.","$ref":"#/components/schemas/rules_engine_rs_v2.ExpressionKind"},"rule_index":{"description":"1-based rule index within the policy, if applicable.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/usize"}]},"rule_name":{"description":"The rule name, if the expression belongs to a named rule.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"rules_engine_rs_v2.ExpressionKind":{"oneOf":[{"const":"precondition"},{"const":"output"}]},"rules_engine_rs_v2.ValidationError":{"type":"object","title":"rules_engine_rs_v2.ValidationError","required":["failures"],"properties":{"failures":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/rules_engine_rs_v2.ExpressionFailure"}}}},"serde_json.Value":{"description":"JSON value type","type":"object","title":"serde_json::Value","properties":{}},"service_accounts.AccountCreated":{"type":"object","title":"service_accounts.AccountCreated","required":["id","organization_id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"service_accounts.AccountId":{"type":"object","title":"service_accounts.AccountId","required":["account_id"],"properties":{"account_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"service_accounts.AccountRow":{"type":"object","title":"service_accounts.AccountRow","required":["business_id","business_kind","created_at","created_by_user_id","id","name","organization_id","permissions","updated_at","updated_by_user_id"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"business_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"created_by_user_id":{"$ref":"#/components/schemas/uuid.Uuid"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"permissions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"updated_by_user_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"service_accounts.CreateAccount":{"type":"object","title":"service_accounts.CreateAccount","required":["business_id","business_kind","name","organization_id"],"properties":{"business_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"business_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"name":{"$ref":"#/components/schemas/std.string.String"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"},"permissions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}}}},"service_accounts.CreateKey":{"type":"object","title":"service_accounts.CreateKey","required":["account_id","expires_at","name"],"properties":{"account_id":{"$ref":"#/components/schemas/uuid.Uuid"},"expires_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"name":{"$ref":"#/components/schemas/std.string.String"}}},"service_accounts.KeyCreated":{"type":"object","title":"service_accounts.KeyCreated","required":["id","secret","service_account_id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"secret":{"$ref":"#/components/schemas/std.string.String"},"service_account_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"service_accounts.KeyId":{"type":"object","title":"service_accounts.KeyId","required":["key_id"],"properties":{"key_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"service_accounts.ListAccounts":{"type":"object","title":"service_accounts.ListAccounts","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"service_accounts.ManagementError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_user_token"},{"const":"not_found"},{"const":"invalid_account_scope"},{"const":"invalid_business"},{"const":"invalid_sites"},{"const":"invalid_key_details"},{"type":"object","title":"storage_unavailable","required":["storage_unavailable"],"properties":{"storage_unavailable":{"$ref":"#/components/schemas/InternalError"}}}]},"service_accounts.UpdateAccount":{"type":"object","title":"service_accounts.UpdateAccount","required":["account_id","permissions"],"properties":{"account_id":{"$ref":"#/components/schemas/uuid.Uuid"},"permissions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/business_network.Permission"}}}},"std.string.String":{"description":"UTF-8 encoded string","type":"string"},"std.time.Duration":{"description":"Time duration type","type":"object","title":"std.time.Duration","required":["nanos","secs"],"properties":{"nanos":{"$ref":"#/components/schemas/u32"},"secs":{"$ref":"#/components/schemas/u64"}}},"std.tuple.Tuple0":{"description":"Unit type","type":"null"},"supplier_metrics.ActorType":{"oneOf":[{"const":"buyer"},{"const":"supplier"},{"const":"integration"},{"const":"system"}]},"supplier_metrics.BusinessRef":{"type":"object","title":"supplier_metrics.BusinessRef","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supplier_metrics.Clock":{"oneOf":[{"const":"wall"},{"const":"business"}]},"supplier_metrics.Completeness":{"oneOf":[{"const":"full"},{"const":"partial"},{"const":"none"}]},"supplier_metrics.Condition":{"oneOf":[{"const":"new"},{"const":"used_grade_0"},{"const":"used_grade_a"},{"const":"used_grade_b"},{"const":"used_grade_c"},{"const":"used_distance"},{"const":"used_hours"},{"const":"used_thickness"}]},"supplier_metrics.Dimensions":{"type":"object","title":"supplier_metrics.Dimensions","required":["buyer","supplier"],"properties":{"buyer":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"},"condition":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supplier_metrics.Condition"}]},"hca":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"make":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"supplier":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}}},"supplier_metrics.Duration":{"type":"object","title":"supplier_metrics.Duration","required":["seconds"],"properties":{"seconds":{"$ref":"#/components/schemas/i64"}}},"supplier_metrics.ListObservationsError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"not_party","required":["not_party"],"properties":{"not_party":{"type":"object","title":"not_party","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}]},"supplier_metrics.ListObservationsRequest":{"type":"object","title":"supplier_metrics.ListObservationsRequest","required":["procurement_id"],"properties":{"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supplier_metrics.ListObservationsResponse":{"type":"object","title":"supplier_metrics.ListObservationsResponse","required":["observations"],"properties":{"observations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics.ObservationEntry"}}}},"supplier_metrics.Lookback":{"oneOf":[{"const":"days_30"},{"const":"days_90"},{"const":"days_365"},{"const":"all"}]},"supplier_metrics.Measure":{"oneOf":[{"type":"object","title":"request_opened","required":["kind"],"properties":{"kind":{"const":"request_opened"}}},{"type":"object","title":"request_answered","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics.Clock"},"kind":{"const":"request_answered"}}},{"type":"object","title":"request_quoted","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics.Clock"},"kind":{"const":"request_quoted"}}},{"type":"object","title":"request_closed","required":["actor","kind"],"properties":{"actor":{"$ref":"#/components/schemas/supplier_metrics.ActorType"},"kind":{"const":"request_closed"}}},{"type":"object","title":"request_completeness","required":["completeness","kind"],"properties":{"completeness":{"$ref":"#/components/schemas/supplier_metrics.Completeness"},"kind":{"const":"request_completeness"}}},{"type":"object","title":"part_requested","required":["kind","result"],"properties":{"kind":{"const":"part_requested"},"result":{"$ref":"#/components/schemas/supplier_metrics.PartResultKind"}}},{"type":"object","title":"part_offered","required":["condition","kind"],"properties":{"condition":{"$ref":"#/components/schemas/supplier_metrics.Condition"},"kind":{"const":"part_offered"}}},{"type":"object","title":"part_quoted","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics.Clock"},"kind":{"const":"part_quoted"}}},{"type":"object","title":"part_changed","required":["change","kind"],"properties":{"change":{"$ref":"#/components/schemas/supplier_metrics.PartChangeKind"},"kind":{"const":"part_changed"}}},{"type":"object","title":"order_requested","required":["kind","path"],"properties":{"kind":{"const":"order_requested"},"path":{"$ref":"#/components/schemas/supplier_metrics.OrderPath"}}},{"type":"object","title":"order_answered","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics.Clock"},"kind":{"const":"order_answered"}}},{"type":"object","title":"order_confirmed","required":["kind"],"properties":{"kind":{"const":"order_confirmed"}}},{"type":"object","title":"order_cancelled","required":["actor","kind","phase"],"properties":{"actor":{"$ref":"#/components/schemas/supplier_metrics.ActorType"},"kind":{"const":"order_cancelled"},"phase":{"$ref":"#/components/schemas/supplier_metrics.OrderPhase"}}}]},"supplier_metrics.MetricRow":{"type":"object","title":"supplier_metrics.MetricRow","required":["count","lookback","measure","scope","updated_at"],"properties":{"count":{"$ref":"#/components/schemas/u64"},"lookback":{"$ref":"#/components/schemas/supplier_metrics.Lookback"},"mean":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supplier_metrics.Duration"}]},"measure":{"$ref":"#/components/schemas/supplier_metrics.Measure"},"p50":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supplier_metrics.Duration"}]},"p90":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supplier_metrics.Duration"}]},"scope":{"$ref":"#/components/schemas/supplier_metrics.Scope"},"stale_on":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/chrono.NaiveDate"}]},"sum":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supplier_metrics.Duration"}]},"updated_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}},"supplier_metrics.ObservationEntry":{"type":"object","title":"supplier_metrics.ObservationEntry","required":["actor","detail","dimensions","id","job_id","kind","observed_at","procurement_id"],"properties":{"actor":{"$ref":"#/components/schemas/supplier_metrics.ActorType"},"business_seconds":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supplier_metrics.Duration"}]},"detail":{"$ref":"#/components/schemas/serde_json.Value"},"dimensions":{"$ref":"#/components/schemas/supplier_metrics.Dimensions"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"kind":{"$ref":"#/components/schemas/supplier_metrics.ObservationKind"},"observed_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"procurement_id":{"$ref":"#/components/schemas/uuid.Uuid"},"started_at":{"oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]}}},"supplier_metrics.ObservationKind":{"oneOf":[{"const":"request_opened"},{"const":"request_answered"},{"const":"request_quoted"},{"const":"request_closed"},{"const":"part_resolved"},{"const":"order_requested"},{"const":"order_confirmed"},{"const":"order_cancelled"}]},"supplier_metrics.OrderPath":{"oneOf":[{"const":"direct"},{"const":"after_quote"}]},"supplier_metrics.OrderPhase":{"oneOf":[{"const":"requested"},{"const":"confirmed"}]},"supplier_metrics.PartChangeKind":{"oneOf":[{"const":"corrected"},{"const":"removed"},{"const":"added"}]},"supplier_metrics.PartResultKind":{"oneOf":[{"const":"offered"},{"const":"not_offered"},{"const":"declined"},{"const":"unanswered"}]},"supplier_metrics.QueryWindowedError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"supplier_not_approved","required":["supplier_not_approved"],"properties":{"supplier_not_approved":{"type":"object","title":"supplier_not_approved","required":["organization_id"],"properties":{"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"const":"buyer_filter_not_allowed"},{"type":"object","title":"buyer_not_caller","required":["buyer_not_caller"],"properties":{"buyer_not_caller":{"type":"object","title":"buyer_not_caller","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},{"type":"object","title":"invalid_make","required":["invalid_make"],"properties":{"invalid_make":{"type":"object","title":"invalid_make","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/std.string.String"}}}}},{"type":"object","title":"invalid_hca","required":["invalid_hca"],"properties":{"invalid_hca":{"type":"object","title":"invalid_hca","required":["value"],"properties":{"value":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"supplier_metrics.QueryWindowedRequest":{"type":"object","title":"supplier_metrics.QueryWindowedRequest","required":["scope_kinds","suppliers"],"properties":{"buyer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}]},"hcas":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"lookbacks":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics.Lookback"}},"make":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"measures":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics.Measure"}},"scope_kinds":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics.ScopeKind"}},"suppliers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}}}},"supplier_metrics.QueryWindowedResponse":{"type":"object","title":"supplier_metrics.QueryWindowedResponse","required":["rows"],"properties":{"rows":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics.MetricRow"}}}},"supplier_metrics.Scope":{"oneOf":[{"type":"object","title":"supplier","required":["kind","supplier"],"properties":{"kind":{"const":"supplier"},"supplier":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}}},{"type":"object","title":"supplier_buyer","required":["buyer","kind","supplier"],"properties":{"buyer":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"},"kind":{"const":"supplier_buyer"},"supplier":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}}},{"type":"object","title":"supplier_make","required":["kind","make","supplier"],"properties":{"kind":{"const":"supplier_make"},"make":{"$ref":"#/components/schemas/std.string.String"},"supplier":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}}},{"type":"object","title":"supplier_hca","required":["hca","kind","supplier"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"supplier_hca"},"supplier":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}}},{"type":"object","title":"supplier_make_hca","required":["hca","kind","make","supplier"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"supplier_make_hca"},"make":{"$ref":"#/components/schemas/std.string.String"},"supplier":{"$ref":"#/components/schemas/supplier_metrics.BusinessRef"}}}]},"supplier_metrics.ScopeKind":{"oneOf":[{"const":"supplier"},{"const":"supplier_buyer"},{"const":"supplier_make"},{"const":"supplier_hca"},{"const":"supplier_make_hca"}]},"supplier_metrics_api.lookback.Lookback":{"oneOf":[{"const":"days_30"},{"const":"days_90"},{"const":"days_365"},{"const":"all"}]},"supplier_metrics_api.measure.ActorType":{"oneOf":[{"const":"buyer"},{"const":"supplier"},{"const":"integration"},{"const":"system"}]},"supplier_metrics_api.measure.Clock":{"oneOf":[{"const":"wall"},{"const":"business"}]},"supplier_metrics_api.measure.Completeness":{"oneOf":[{"const":"full"},{"const":"partial"},{"const":"none"}]},"supplier_metrics_api.measure.Condition":{"oneOf":[{"const":"new"},{"const":"used_grade_0"},{"const":"used_grade_a"},{"const":"used_grade_b"},{"const":"used_grade_c"},{"const":"used_distance"},{"const":"used_hours"},{"const":"used_thickness"}]},"supplier_metrics_api.measure.Measure":{"oneOf":[{"type":"object","title":"request_opened","required":["kind"],"properties":{"kind":{"const":"request_opened"}}},{"type":"object","title":"request_answered","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Clock"},"kind":{"const":"request_answered"}}},{"type":"object","title":"request_quoted","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Clock"},"kind":{"const":"request_quoted"}}},{"type":"object","title":"request_closed","required":["actor","kind"],"properties":{"actor":{"$ref":"#/components/schemas/supplier_metrics_api.measure.ActorType"},"kind":{"const":"request_closed"}}},{"type":"object","title":"request_completeness","required":["completeness","kind"],"properties":{"completeness":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Completeness"},"kind":{"const":"request_completeness"}}},{"type":"object","title":"part_requested","required":["kind","result"],"properties":{"kind":{"const":"part_requested"},"result":{"$ref":"#/components/schemas/supplier_metrics_api.measure.PartResultKind"}}},{"type":"object","title":"part_offered","required":["condition","kind"],"properties":{"condition":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Condition"},"kind":{"const":"part_offered"}}},{"type":"object","title":"part_quoted","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Clock"},"kind":{"const":"part_quoted"}}},{"type":"object","title":"part_changed","required":["change","kind"],"properties":{"change":{"$ref":"#/components/schemas/supplier_metrics_api.measure.PartChangeKind"},"kind":{"const":"part_changed"}}},{"type":"object","title":"order_requested","required":["kind","path"],"properties":{"kind":{"const":"order_requested"},"path":{"$ref":"#/components/schemas/supplier_metrics_api.measure.OrderPath"}}},{"type":"object","title":"order_answered","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Clock"},"kind":{"const":"order_answered"}}},{"type":"object","title":"order_confirmed","required":["kind"],"properties":{"kind":{"const":"order_confirmed"}}},{"type":"object","title":"order_cancelled","required":["actor","kind","phase"],"properties":{"actor":{"$ref":"#/components/schemas/supplier_metrics_api.measure.ActorType"},"kind":{"const":"order_cancelled"},"phase":{"$ref":"#/components/schemas/supplier_metrics_api.measure.OrderPhase"}}}]},"supplier_metrics_api.measure.OrderPath":{"oneOf":[{"const":"direct"},{"const":"after_quote"}]},"supplier_metrics_api.measure.OrderPhase":{"oneOf":[{"const":"requested"},{"const":"confirmed"}]},"supplier_metrics_api.measure.PartChangeKind":{"oneOf":[{"const":"corrected"},{"const":"removed"},{"const":"added"}]},"supplier_metrics_api.measure.PartResultKind":{"oneOf":[{"const":"offered"},{"const":"not_offered"},{"const":"declined"},{"const":"unanswered"}]},"supplier_metrics_api.measure.PartScopedMeasure":{"oneOf":[{"type":"object","title":"part_requested","required":["kind","result"],"properties":{"kind":{"const":"part_requested"},"result":{"$ref":"#/components/schemas/supplier_metrics_api.measure.PartResultKind"}}},{"type":"object","title":"part_offered","required":["condition","kind"],"properties":{"condition":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Condition"},"kind":{"const":"part_offered"}}},{"type":"object","title":"part_changed","required":["change","kind"],"properties":{"change":{"$ref":"#/components/schemas/supplier_metrics_api.measure.PartChangeKind"},"kind":{"const":"part_changed"}}},{"type":"object","title":"part_quoted","required":["clock","kind"],"properties":{"clock":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Clock"},"kind":{"const":"part_quoted"}}}]},"suppliers_jobs_parts_verify.Request":{"type":"object","title":"suppliers_jobs_parts_verify.Request","required":["job_id","parts","supplier_business_id"],"properties":{"job_id":{"description":"The job to verify parts for.","$ref":"#/components/schemas/uuid.Uuid"},"parts":{"description":"The parts the caller wants verified against the job's vehicle.","type":"array","items":{"$ref":"#/components/schemas/parts_verification.GapcIdentity"}},"supplier_business_id":{"description":"The supplier business the caller is acting on behalf of.","$ref":"#/components/schemas/uuid.Uuid"}}},"suppliers_jobs_parts_verify.Response":{"type":"object","title":"suppliers_jobs_parts_verify.Response","required":["parts"],"properties":{"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/parts_verification.PartVerification"}}}},"supply_ranker.Activation":{"oneOf":[{"type":"object","title":"unconditional","required":["kind"],"properties":{"kind":{"const":"unconditional"}}},{"type":"object","title":"conditional","required":["condition","kind"],"properties":{"condition":{"oneOf":[{"type":"object","title":"true","required":["type"],"properties":{"type":{"const":"true"}}},{"type":"object","title":"and<supply_ranker.ConditionObservation>","required":["clauses","truth","type"],"properties":{"clauses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Outcome_supply_ranker.ConditionObservation_"}},"truth":{"$ref":"#/components/schemas/supply_ranker.Truth"},"type":{"const":"and"}}},{"type":"object","title":"or<supply_ranker.ConditionObservation>","required":["clauses","truth","type"],"properties":{"clauses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Outcome_supply_ranker.ConditionObservation_"}},"truth":{"$ref":"#/components/schemas/supply_ranker.Truth"},"type":{"const":"or"}}},{"type":"object","title":"not<supply_ranker.ConditionObservation>","required":["inner","truth","type"],"properties":{"inner":{"$ref":"#/components/schemas/supply_ranker.Outcome_supply_ranker.ConditionObservation_"},"truth":{"$ref":"#/components/schemas/supply_ranker.Truth"},"type":{"const":"not"}}},{"type":"object","title":"atom<supply_ranker.ConditionObservation>","required":["observed","truth","type"],"properties":{"observed":{"$ref":"#/components/schemas/supply_ranker.ConditionObservation"},"truth":{"$ref":"#/components/schemas/supply_ranker.Truth"},"type":{"const":"atom"}}}]},"kind":{"const":"conditional"}}}]},"supply_ranker.BasketMembership":{"oneOf":[{"const":"selected"},{"const":"not_selected"}]},"supply_ranker.BindError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"scope_bound"},{"const":"ruleset_not_found"}]},"supply_ranker.BindRequest":{"type":"object","title":"supply_ranker.BindRequest","required":["ruleset_id","scope"],"properties":{"ruleset_id":{"$ref":"#/components/schemas/uuid.Uuid"},"scope":{"$ref":"#/components/schemas/supply_ranker.Scope"}}},"supply_ranker.BindResponse":{"type":"object","title":"supply_ranker.BindResponse","required":["binding"],"properties":{"binding":{"$ref":"#/components/schemas/supply_ranker.BindingResponse"}}},"supply_ranker.BindingResponse":{"type":"object","title":"supply_ranker.BindingResponse","required":["created_at","id","ruleset_id","scope"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"ruleset_id":{"$ref":"#/components/schemas/uuid.Uuid"},"scope":{"$ref":"#/components/schemas/supply_ranker.Scope"}}},"supply_ranker.BindingSummary":{"type":"object","title":"supply_ranker.BindingSummary","required":["created_at","id","ruleset","scope","scope_kind"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"ruleset":{"$ref":"#/components/schemas/supply_ranker.RulesetReference"},"scope":{"$ref":"#/components/schemas/std.string.String"},"scope_kind":{"$ref":"#/components/schemas/supply_ranker.ScopeKind"}}},"supply_ranker.BusinessRef":{"type":"object","title":"supply_ranker.BusinessRef","required":["business_id","organization_id"],"properties":{"business_id":{"$ref":"#/components/schemas/uuid.Uuid"},"organization_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.CandidateInput":{"type":"object","title":"supply_ranker.CandidateInput","required":["parts","signals","supplier"],"properties":{"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.CandidatePartInput"}},"signals":{"$ref":"#/components/schemas/supply_ranker.SignalSet"},"supplier":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"},"supply_types":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.SupplyType"}}}},"supply_ranker.CandidatePartInput":{"type":"object","title":"supply_ranker.CandidatePartInput","required":["part_id","signals"],"properties":{"part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"signals":{"$ref":"#/components/schemas/supply_ranker.PartSignalSet"}}},"supply_ranker.Condition":{"oneOf":[{"type":"object","title":"true","required":["type"],"properties":{"type":{"const":"true"}}},{"type":"object","title":"and","required":["of","type"],"properties":{"of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Condition"}},"type":{"const":"and"}}},{"type":"object","title":"or","required":["of","type"],"properties":{"of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Condition"}},"type":{"const":"or"}}},{"type":"object","title":"not","required":["of","type"],"properties":{"of":{"$ref":"#/components/schemas/supply_ranker.Condition"},"type":{"const":"not"}}},{"$ref":"#/components/schemas/supply_ranker.ConditionAtom"}]},"supply_ranker.ConditionAtom":{"oneOf":[{"type":"object","title":"make","required":["type","value"],"properties":{"type":{"const":"make"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"model","required":["type","value"],"properties":{"type":{"const":"model"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"vehicle_age_months","required":["type","value"],"properties":{"type":{"const":"vehicle_age_months"},"value":{"oneOf":[{"type":"object","title":"min<u32>","required":["op","value"],"properties":{"op":{"const":"min"},"value":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"max<u32>","required":["op","value"],"properties":{"op":{"const":"max"},"value":{"$ref":"#/components/schemas/u32"}}}]}}},{"type":"object","title":"job_kind","required":["type","value"],"properties":{"type":{"const":"job_kind"},"value":{"$ref":"#/components/schemas/supply_ranker.JobKind"}}}]},"supply_ranker.ConditionObservation":{"oneOf":[{"type":"object","title":"make","required":["atom","observed"],"properties":{"atom":{"const":"make"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"model","required":["atom","observed"],"properties":{"atom":{"const":"model"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"vehicle_age_months","required":["atom","observed"],"properties":{"atom":{"const":"vehicle_age_months"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"job_kind","required":["atom","observed"],"properties":{"atom":{"const":"job_kind"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.JobKind"}]}}}]},"supply_ranker.Considered":{"type":"object","title":"supply_ranker.Considered","required":["binding_id","condition","held","policy_id","policy_name","position","rule_id","ruleset_id","scope"],"properties":{"binding_id":{"$ref":"#/components/schemas/uuid.Uuid"},"condition":{"$ref":"#/components/schemas/supply_ranker.Condition"},"held":{"$ref":"#/components/schemas/bool"},"policy_id":{"$ref":"#/components/schemas/uuid.Uuid"},"policy_name":{"$ref":"#/components/schemas/std.string.String"},"position":{"$ref":"#/components/schemas/i32"},"rule_id":{"$ref":"#/components/schemas/uuid.Uuid"},"ruleset_id":{"$ref":"#/components/schemas/uuid.Uuid"},"scope":{"$ref":"#/components/schemas/supply_ranker.Scope"}}},"supply_ranker.CreatePolicyError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_policy","required":["invalid_policy"],"properties":{"invalid_policy":{"type":"object","title":"invalid_policy","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"name_taken"}]},"supply_ranker.CreatePolicyRequest":{"type":"object","title":"supply_ranker.CreatePolicyRequest","required":["body","name"],"properties":{"body":{"$ref":"#/components/schemas/supply_ranker.input.Policy"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.CreatePolicyResponse":{"type":"object","title":"supply_ranker.CreatePolicyResponse","required":["policy"],"properties":{"policy":{"$ref":"#/components/schemas/supply_ranker.PolicyResponse"}}},"supply_ranker.CreateRulesetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_condition","required":["invalid_condition"],"properties":{"invalid_condition":{"type":"object","title":"invalid_condition","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"name_taken"},{"const":"slot_taken"},{"const":"policy_not_found"}]},"supply_ranker.CreateRulesetRequest":{"type":"object","title":"supply_ranker.CreateRulesetRequest","required":["name","rules"],"properties":{"name":{"$ref":"#/components/schemas/std.string.String"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.RuleInput"}}}},"supply_ranker.CreateRulesetResponse":{"type":"object","title":"supply_ranker.CreateRulesetResponse","required":["ruleset"],"properties":{"ruleset":{"$ref":"#/components/schemas/supply_ranker.RulesetResponse"}}},"supply_ranker.DecisionInput":{"type":"object","title":"supply_ranker.DecisionInput","required":["candidates","job"],"properties":{"candidates":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.EvaluatedCandidate"}},"job":{"$ref":"#/components/schemas/supply_ranker.Job"}}},"supply_ranker.DeferReason":{"oneOf":[{"const":"group_limit_reached"}]},"supply_ranker.DeletePolicyError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"const":"in_use"}]},"supply_ranker.DeletePolicyRequest":{"type":"object","title":"supply_ranker.DeletePolicyRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.DeleteRulesetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"},{"const":"in_use"}]},"supply_ranker.DeleteRulesetRequest":{"type":"object","title":"supply_ranker.DeleteRulesetRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.Disposition":{"oneOf":[{"type":"object","title":"contact","required":["kind"],"properties":{"kind":{"const":"contact"}}},{"type":"object","title":"defer","required":["kind","reason"],"properties":{"kind":{"const":"defer"},"reason":{"$ref":"#/components/schemas/supply_ranker.DeferReason"}}},{"type":"object","title":"skip","required":["kind","reason"],"properties":{"kind":{"const":"skip"},"reason":{"$ref":"#/components/schemas/supply_ranker.SkipReason"}}},{"type":"object","title":"settled","required":["kind","state"],"properties":{"kind":{"const":"settled"},"state":{"$ref":"#/components/schemas/supply_ranker.ProcurementState"}}}]},"supply_ranker.EvaluateError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_request","required":["invalid_request"],"properties":{"invalid_request":{"type":"object","title":"invalid_request","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"policy_resolution_failed"},{"const":"no_policy_bound"},{"const":"metrics_unavailable"}]},"supply_ranker.EvaluateOutput":{"oneOf":[{"type":"object","title":"supply_ranker.Evaluation<supply_ranker.bayesian_v1.Job, supply_ranker.bayesian_v1.Evidence>","required":["job","schema","suppliers"],"properties":{"job":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Job"},"schema":{"const":"bayesian_v1"},"suppliers":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"supply_ranker.SupplierDecision<supply_ranker.bayesian_v1.Evidence>","required":["disposition","evidence","supplier"],"properties":{"disposition":{"$ref":"#/components/schemas/supply_ranker.Disposition"},"evidence":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Evidence"},"supplier":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}}}}}},{"type":"object","title":"supply_ranker.Evaluation<supply_ranker.discovery_v1.Job, supply_ranker.discovery_v1.Evidence>","required":["job","schema","suppliers"],"properties":{"job":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Job"},"schema":{"const":"discovery_v1"},"suppliers":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"supply_ranker.SupplierDecision<supply_ranker.discovery_v1.Evidence>","required":["disposition","evidence","supplier"],"properties":{"disposition":{"$ref":"#/components/schemas/supply_ranker.Disposition"},"evidence":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Evidence"},"supplier":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}}}}}}]},"supply_ranker.EvaluateRequest":{"type":"object","title":"supply_ranker.EvaluateRequest","required":["candidates","context","job_id","parts"],"properties":{"candidates":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.CandidateInput"}},"context":{"$ref":"#/components/schemas/supply_ranker.input.PolicyContext"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PartLine"}}}},"supply_ranker.EvaluateResponse":{"type":"object","title":"supply_ranker.EvaluateResponse","required":["decided_at","decision_id","input","output","policy"],"properties":{"decided_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"decision_id":{"$ref":"#/components/schemas/uuid.Uuid"},"input":{"$ref":"#/components/schemas/supply_ranker.DecisionInput"},"output":{"$ref":"#/components/schemas/supply_ranker.EvaluateOutput"},"policy":{"$ref":"#/components/schemas/supply_ranker.PolicyRef"}}},"supply_ranker.EvaluatedCandidate":{"type":"object","title":"supply_ranker.EvaluatedCandidate","required":["candidate"],"properties":{"candidate":{"$ref":"#/components/schemas/supply_ranker.CandidateInput"},"records":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.TrackRecord"}}}},"supply_ranker.ExplainError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_context","required":["invalid_context"],"properties":{"invalid_context":{"type":"object","title":"invalid_context","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"supply_ranker.ExplainRequest":{"type":"object","title":"supply_ranker.ExplainRequest","required":["context"],"properties":{"context":{"$ref":"#/components/schemas/supply_ranker.input.PolicyContext"}}},"supply_ranker.ExplainResponse":{"type":"object","title":"supply_ranker.ExplainResponse","required":["considered"],"properties":{"considered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Considered"}}}},"supply_ranker.FilterObservation":{"oneOf":[{"type":"object","title":"supply_type","required":["atom","observed"],"properties":{"atom":{"const":"supply_type"},"observed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.SupplyType"}}}},{"type":"object","title":"supply_type_only","required":["atom","observed"],"properties":{"atom":{"const":"supply_type_only"},"observed":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.SupplyType"}}}},{"type":"object","title":"preferred","required":["atom","observed"],"properties":{"atom":{"const":"preferred"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"preferred_rank","required":["atom","observed"],"properties":{"atom":{"const":"preferred_rank"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"distance","required":["atom","observed"],"properties":{"atom":{"const":"distance"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"has_stock","required":["atom","observed"],"properties":{"atom":{"const":"has_stock"},"observed":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.StockPresence"}}},{"type":"object","title":"has_yard_vehicle","required":["atom","observed"],"properties":{"atom":{"const":"has_yard_vehicle"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"yard_vehicle_count","required":["atom","observed"],"properties":{"atom":{"const":"yard_vehicle_count"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"same_zone","required":["atom","repairer","supplier"],"properties":{"atom":{"const":"same_zone"},"repairer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Zone"}]},"supplier":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Zone"}}}},{"type":"object","title":"supplier","required":["atom"],"properties":{"atom":{"const":"supplier"}}},{"type":"object","title":"metrics_rate","required":["atom","observed"],"properties":{"atom":{"const":"metrics_rate"},"observed":{"type":"object","title":"supply_ranker.Metric<rust_decimal.Decimal>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/supply_ranker.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"metrics_duration","required":["atom","observed"],"properties":{"atom":{"const":"metrics_duration"},"observed":{"type":"object","title":"supply_ranker.Metric<supply_ranker.Seconds>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/supply_ranker.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Seconds"}]}}}}}]},"supply_ranker.GetPolicyError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"supply_ranker.GetPolicyRequest":{"type":"object","title":"supply_ranker.GetPolicyRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.GetPolicyResponse":{"type":"object","title":"supply_ranker.GetPolicyResponse","required":["policy"],"properties":{"policy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.PolicyResponse"}]}}},"supply_ranker.GetRulesetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"supply_ranker.GetRulesetRequest":{"type":"object","title":"supply_ranker.GetRulesetRequest","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.GetRulesetResponse":{"type":"object","title":"supply_ranker.GetRulesetResponse","required":["rules","ruleset"],"properties":{"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.RuleResponse"}},"ruleset":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.RulesetResponse"}]}}},"supply_ranker.GroupActivation":{"type":"object","title":"supply_ranker.GroupActivation","required":["activation","group"],"properties":{"activation":{"$ref":"#/components/schemas/supply_ranker.Activation"},"group":{"$ref":"#/components/schemas/u32"}}},"supply_ranker.Job":{"type":"object","title":"supply_ranker.Job","required":["context","job_id","parts"],"properties":{"context":{"$ref":"#/components/schemas/supply_ranker.output.PolicyContext"},"job_id":{"$ref":"#/components/schemas/uuid.Uuid"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PartLine"}}}},"supply_ranker.JobKind":{"oneOf":[{"const":"insurance"},{"const":"private"}]},"supply_ranker.ListBindingsError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"},{"type":"object","title":"invalid_query","required":["invalid_query"],"properties":{"invalid_query":{"type":"object","title":"invalid_query","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"supply_ranker.ListBindingsRequest":{"type":"object","title":"supply_ranker.ListBindingsRequest","properties":{"business":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}]},"market":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"page":{"$ref":"#/components/schemas/PageRequest"},"ruleset_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"scope_kinds":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.ScopeKind"}}}},"supply_ranker.ListPoliciesError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"},{"type":"object","title":"invalid_query","required":["invalid_query"],"properties":{"invalid_query":{"type":"object","title":"invalid_query","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"supply_ranker.ListPoliciesRequest":{"type":"object","title":"supply_ranker.ListPoliciesRequest","properties":{"page":{"$ref":"#/components/schemas/PageRequest"},"schemas":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PolicySchema"}}}},"supply_ranker.ListRulesetsError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"invalid_cursor"},{"type":"object","title":"invalid_query","required":["invalid_query"],"properties":{"invalid_query":{"type":"object","title":"invalid_query","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"supply_ranker.ListRulesetsRequest":{"type":"object","title":"supply_ranker.ListRulesetsRequest","properties":{"page":{"$ref":"#/components/schemas/PageRequest"},"policy_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"supply_ranker.MeasureCell":{"type":"object","title":"supply_ranker.MeasureCell","required":["measure","value"],"properties":{"measure":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"},"value":{"$ref":"#/components/schemas/supply_ranker.MeasureValue"}}},"supply_ranker.MeasureValue":{"oneOf":[{"type":"object","title":"count","required":["count","shape"],"properties":{"count":{"$ref":"#/components/schemas/u64"},"shape":{"const":"count"}}},{"type":"object","title":"duration","required":["count","mean","p50","p90","shape"],"properties":{"count":{"$ref":"#/components/schemas/u64"},"mean":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Seconds"}]},"p50":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Seconds"}]},"p90":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Seconds"}]},"shape":{"const":"duration"}}}]},"supply_ranker.NzRegion":{"oneOf":[{"const":"north_island"},{"const":"south_island"}]},"supply_ranker.Orchestration":{"type":"object","title":"supply_ranker.Orchestration","required":["stop"],"properties":{"stop":{"$ref":"#/components/schemas/supply_ranker.StopCondition"}}},"supply_ranker.PartIdentity":{"type":"object","title":"supply_ranker.PartIdentity","required":["brand_id","mpn"],"properties":{"brand_id":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.PartLine":{"type":"object","title":"supply_ranker.PartLine","required":["description","hca","identity","part_id","quantity"],"properties":{"description":{"$ref":"#/components/schemas/std.string.String"},"hca":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"identity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.PartIdentity"}]},"part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"quantity":{"$ref":"#/components/schemas/u16"}}},"supply_ranker.PartListing":{"oneOf":[{"type":"object","title":"direct","required":["listing","price","stock"],"properties":{"listing":{"const":"direct"},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"stock":{"$ref":"#/components/schemas/supply_ranker.Stock"}}},{"type":"object","title":"interchange","required":["listing","price","stock"],"properties":{"listing":{"const":"interchange"},"price":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"stock":{"$ref":"#/components/schemas/supply_ranker.Stock"}}},{"type":"object","title":"none","required":["listing"],"properties":{"listing":{"const":"none"}}}]},"supply_ranker.PartScope":{"oneOf":[{"type":"object","title":"supplier_hca","required":["hca","kind"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"supplier_hca"}}},{"type":"object","title":"supplier_make_hca","required":["hca","kind"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"supplier_make_hca"}}}]},"supply_ranker.PartScopeKind":{"oneOf":[{"const":"supplier_hca"},{"const":"supplier_make_hca"}]},"supply_ranker.PartSignalSet":{"type":"object","title":"supply_ranker.PartSignalSet","properties":{"basket":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.BasketMembership"}]},"listings":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PartListing"}}}},"supply_ranker.PolicyRef":{"type":"object","title":"supply_ranker.PolicyRef","required":["binding_id","policy_id","rule_id"],"properties":{"binding_id":{"$ref":"#/components/schemas/uuid.Uuid"},"policy_id":{"$ref":"#/components/schemas/uuid.Uuid"},"rule_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.PolicyResponse":{"type":"object","title":"supply_ranker.PolicyResponse","required":["body","created_at","id","name"],"properties":{"body":{"$ref":"#/components/schemas/supply_ranker.output.Policy"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.PolicySchema":{"oneOf":[{"const":"bayesian_v1"},{"const":"discovery_v1"}]},"supply_ranker.PolicySummary":{"type":"object","title":"supply_ranker.PolicySummary","required":["created_at","id","name","schema"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"schema":{"$ref":"#/components/schemas/supply_ranker.PolicySchema"}}},"supply_ranker.ProcurementState":{"oneOf":[{"const":"pending"},{"const":"quoted"},{"const":"declined"},{"const":"closed"}]},"supply_ranker.Provenance":{"type":"object","title":"supply_ranker.Provenance","properties":{"considered":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Considered"}},"used":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.RecordRef"}}}},"supply_ranker.RecordRef":{"type":"object","title":"supply_ranker.RecordRef","required":["lookback","scope"],"properties":{"lookback":{"$ref":"#/components/schemas/supplier_metrics_api.lookback.Lookback"},"scope":{"$ref":"#/components/schemas/supply_ranker.RecordScope"}}},"supply_ranker.RecordScope":{"oneOf":[{"type":"object","title":"supplier","required":["level","scope"],"properties":{"level":{"const":"supplier"},"scope":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"}}},{"type":"object","title":"part","required":["level","scope"],"properties":{"level":{"const":"part"},"scope":{"$ref":"#/components/schemas/supply_ranker.PartScope"}}}]},"supply_ranker.RuleInput":{"type":"object","title":"supply_ranker.RuleInput","required":["condition","policy_id","position"],"properties":{"condition":{"$ref":"#/components/schemas/supply_ranker.Condition"},"policy_id":{"$ref":"#/components/schemas/uuid.Uuid"},"position":{"$ref":"#/components/schemas/i32"}}},"supply_ranker.RuleResponse":{"type":"object","title":"supply_ranker.RuleResponse","required":["condition","created_at","id","policy_id","position","ruleset_id"],"properties":{"condition":{"$ref":"#/components/schemas/supply_ranker.Condition"},"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"policy_id":{"$ref":"#/components/schemas/uuid.Uuid"},"position":{"$ref":"#/components/schemas/i32"},"ruleset_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.RulesetReference":{"type":"object","title":"supply_ranker.RulesetReference","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.RulesetResponse":{"type":"object","title":"supply_ranker.RulesetResponse","required":["created_at","id","name"],"properties":{"created_at":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.Scope":{"oneOf":[{"type":"object","title":"site","required":["kind","repairer","site"],"properties":{"kind":{"const":"site"},"repairer":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"},"site":{"$ref":"#/components/schemas/uuid.Uuid"}}},{"type":"object","title":"repairer","required":["kind","repairer"],"properties":{"kind":{"const":"repairer"},"repairer":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}}},{"type":"object","title":"insurer","required":["insurer","kind"],"properties":{"insurer":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"},"kind":{"const":"insurer"}}},{"type":"object","title":"market","required":["country","kind"],"properties":{"country":{"$ref":"#/components/schemas/iso_country.CountryCode"},"kind":{"const":"market"}}},{"type":"object","title":"default","required":["kind"],"properties":{"kind":{"const":"default"}}}]},"supply_ranker.ScopeKind":{"oneOf":[{"const":"site"},{"const":"repairer"},{"const":"insurer"},{"const":"market"},{"const":"default"}]},"supply_ranker.SearchBindingsRequest":{"type":"object","title":"supply_ranker.SearchBindingsRequest","required":["query"],"properties":{"business":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}]},"market":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]},"page":{"$ref":"#/components/schemas/PageRequest"},"query":{"$ref":"#/components/schemas/std.string.String"},"ruleset_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"scope_kinds":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.ScopeKind"}}}},"supply_ranker.SearchPoliciesRequest":{"type":"object","title":"supply_ranker.SearchPoliciesRequest","required":["query"],"properties":{"page":{"$ref":"#/components/schemas/PageRequest"},"query":{"$ref":"#/components/schemas/std.string.String"},"schemas":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PolicySchema"}}}},"supply_ranker.SearchRulesetsRequest":{"type":"object","title":"supply_ranker.SearchRulesetsRequest","required":["query"],"properties":{"page":{"$ref":"#/components/schemas/PageRequest"},"policy_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"query":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.Seconds":{"type":"object","title":"supply_ranker.Seconds","required":["seconds"],"properties":{"seconds":{"$ref":"#/components/schemas/i64"}}},"supply_ranker.SignalSet":{"type":"object","title":"supply_ranker.SignalSet","properties":{"distance":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"preferred_rank":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"procurement":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.ProcurementState"}]},"yard_vehicles":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/supply_ranker.YardVehicleStatus"}},"zones":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Zone"}}}},"supply_ranker.SkipReason":{"oneOf":[{"const":"no_coverage"},{"const":"known_stock_in_basket"},{"const":"no_group_matched"}]},"supply_ranker.Statistic":{"oneOf":[{"const":"p50"},{"const":"p90"},{"const":"mean"}]},"supply_ranker.Stock":{"oneOf":[{"type":"object","title":"finite","required":["kind","units"],"properties":{"kind":{"const":"finite"},"units":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"infinite","required":["kind"],"properties":{"kind":{"const":"infinite"}}},{"type":"object","title":"unknown","required":["kind"],"properties":{"kind":{"const":"unknown"}}}]},"supply_ranker.StopCondition":{"oneOf":[{"type":"object","title":"never","required":["type"],"properties":{"type":{"const":"never"}}},{"type":"object","title":"any","required":["type","value"],"properties":{"type":{"const":"any"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.StopCondition"}}}},{"type":"object","title":"all","required":["type","value"],"properties":{"type":{"const":"all"},"value":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.StopCondition"}}}},{"type":"object","title":"fulfilled_baskets","required":["min","type"],"properties":{"min":{"$ref":"#/components/schemas/u32"},"type":{"const":"fulfilled_baskets"}}}]},"supply_ranker.SupplierScope":{"oneOf":[{"const":"supplier"},{"const":"supplier_buyer"},{"const":"supplier_make"}]},"supply_ranker.SupplyType":{"oneOf":[{"const":"oem_authorized"},{"const":"oem"},{"const":"used"},{"const":"aftermarket"}]},"supply_ranker.TrackRecord":{"type":"object","title":"supply_ranker.TrackRecord","required":["lookback","measures","scope"],"properties":{"lookback":{"$ref":"#/components/schemas/supplier_metrics_api.lookback.Lookback"},"measures":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.MeasureCell"}},"scope":{"$ref":"#/components/schemas/supply_ranker.RecordScope"}}},"supply_ranker.Truth":{"oneOf":[{"const":"true"},{"const":"false"},{"const":"unknown"}]},"supply_ranker.UnbindError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"supply_ranker.UnbindRequest":{"type":"object","title":"supply_ranker.UnbindRequest","required":["binding_id"],"properties":{"binding_id":{"$ref":"#/components/schemas/uuid.Uuid"}}},"supply_ranker.UpdatePolicyError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_policy","required":["invalid_policy"],"properties":{"invalid_policy":{"type":"object","title":"invalid_policy","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"not_found"},{"const":"name_taken"}]},"supply_ranker.UpdatePolicyRequest":{"type":"object","title":"supply_ranker.UpdatePolicyRequest","required":["body","id","name"],"properties":{"body":{"$ref":"#/components/schemas/supply_ranker.input.Policy"},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.UpdatePolicyResponse":{"type":"object","title":"supply_ranker.UpdatePolicyResponse","required":["policy"],"properties":{"policy":{"$ref":"#/components/schemas/supply_ranker.PolicyResponse"}}},"supply_ranker.UpdateRulesetError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_condition","required":["invalid_condition"],"properties":{"invalid_condition":{"type":"object","title":"invalid_condition","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/std.string.String"}}}}},{"const":"not_found"},{"const":"name_taken"},{"const":"slot_taken"},{"const":"policy_not_found"}]},"supply_ranker.UpdateRulesetRequest":{"type":"object","title":"supply_ranker.UpdateRulesetRequest","required":["id","name","rules"],"properties":{"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"rules":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.RuleInput"}}}},"supply_ranker.UpdateRulesetResponse":{"type":"object","title":"supply_ranker.UpdateRulesetResponse","required":["ruleset"],"properties":{"ruleset":{"$ref":"#/components/schemas/supply_ranker.RulesetResponse"}}},"supply_ranker.YardVehicleStatus":{"oneOf":[{"const":"in_yard"},{"const":"dismantled"},{"const":"scrapped"},{"const":"unknown"}]},"supply_ranker.Zone":{"oneOf":[{"type":"object","title":"nz","required":["market","region"],"properties":{"market":{"const":"nz"},"region":{"$ref":"#/components/schemas/supply_ranker.NzRegion"}}}]},"supply_ranker.bayesian_v1.Allocation":{"oneOf":[{"type":"object","title":"grouped","required":["atoms","group","kind","position"],"properties":{"atoms":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"supply_ranker.AtomOutcome<supply_ranker.FilterObservation>","required":["observed","path","truth"],"properties":{"observed":{"$ref":"#/components/schemas/supply_ranker.FilterObservation"},"path":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/u32"}},"truth":{"$ref":"#/components/schemas/supply_ranker.Truth"}}}},"group":{"$ref":"#/components/schemas/u32"},"kind":{"const":"grouped"},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"position":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"ungrouped","required":["kind"],"properties":{"kind":{"const":"ungrouped"}}},{"type":"object","title":"not_attempted","required":["kind"],"properties":{"kind":{"const":"not_attempted"}}}]},"supply_ranker.bayesian_v1.CandidateScore":{"type":"object","title":"supply_ranker.bayesian_v1.CandidateScore","required":["components","composite","part_components"],"properties":{"components":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.ScoreComponent"}},"composite":{"$ref":"#/components/schemas/std.string.String"},"part_components":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.PartScoreComponent"}}}},"supply_ranker.bayesian_v1.Direction":{"oneOf":[{"const":"higher_is_better"},{"const":"lower_is_better"}]},"supply_ranker.bayesian_v1.Evidence":{"type":"object","title":"supply_ranker.bayesian_v1.Evidence","required":["allocation","rank","score"],"properties":{"allocation":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Allocation"},"rank":{"$ref":"#/components/schemas/u32"},"score":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.CandidateScore"}}},"supply_ranker.bayesian_v1.Factor":{"oneOf":[{"type":"object","title":"track_record_rate","required":["denominator","kind","numerator"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"kind":{"const":"track_record_rate"},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}}}},{"type":"object","title":"track_record_duration","required":["kind","measure","statistic"],"properties":{"kind":{"const":"track_record_duration"},"measure":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"},"statistic":{"$ref":"#/components/schemas/supply_ranker.Statistic"}}},{"type":"object","title":"preferred_rank","required":["kind"],"properties":{"kind":{"const":"preferred_rank"}}},{"type":"object","title":"distance","required":["kind"],"properties":{"kind":{"const":"distance"}}},{"type":"object","title":"yard_vehicle","required":["kind"],"properties":{"kind":{"const":"yard_vehicle"}}}]},"supply_ranker.bayesian_v1.FactorPolicy":{"oneOf":[{"type":"object","title":"track_record_rate","required":["denominator","direction","kind","numerator","prior","scope_chain","weight"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"direction":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Direction"},"kind":{"const":"track_record_rate"},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"prior":{"$ref":"#/components/schemas/std.string.String"},"scope_chain":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"}},"weight":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"track_record_duration","required":["kind","measure","missing","scope_chain","statistic","weight","worst"],"properties":{"kind":{"const":"track_record_duration"},"measure":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"},"missing":{"$ref":"#/components/schemas/std.string.String"},"scope_chain":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"}},"statistic":{"$ref":"#/components/schemas/supply_ranker.Statistic"},"weight":{"$ref":"#/components/schemas/std.string.String"},"worst":{"$ref":"#/components/schemas/supply_ranker.Seconds"}}},{"type":"object","title":"preferred_rank","required":["kind","steps","unranked","weight"],"properties":{"kind":{"const":"preferred_rank"},"steps":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"unranked":{"$ref":"#/components/schemas/std.string.String"},"weight":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"distance","required":["farthest","kind","missing","weight"],"properties":{"farthest":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"distance"},"missing":{"$ref":"#/components/schemas/std.string.String"},"weight":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"yard_vehicle","required":["kind","missing","steps","weight"],"properties":{"kind":{"const":"yard_vehicle"},"missing":{"$ref":"#/components/schemas/std.string.String"},"steps":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"weight":{"$ref":"#/components/schemas/std.string.String"}}}]},"supply_ranker.bayesian_v1.Job":{"type":"object","title":"supply_ranker.bayesian_v1.Job","required":["groups","total_weight"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.GroupActivation"}},"total_weight":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.bayesian_v1.Lookbacks":{"type":"object","title":"supply_ranker.bayesian_v1.Lookbacks","required":["min_trials","windows"],"properties":{"min_trials":{"$ref":"#/components/schemas/u64"},"windows":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.lookback.Lookback"}}}},"supply_ranker.bayesian_v1.Observation":{"oneOf":[{"type":"object","title":"rate","required":["kind","prior","provenance","smoothed","successes","trials"],"properties":{"kind":{"const":"rate"},"prior":{"$ref":"#/components/schemas/std.string.String"},"provenance":{"$ref":"#/components/schemas/supply_ranker.Provenance"},"smoothed":{"$ref":"#/components/schemas/std.string.String"},"successes":{"$ref":"#/components/schemas/u64"},"trials":{"$ref":"#/components/schemas/u64"}}},{"type":"object","title":"duration","required":["kind","provenance","value"],"properties":{"kind":{"const":"duration"},"provenance":{"$ref":"#/components/schemas/supply_ranker.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Seconds"}]}}},{"type":"object","title":"preferred_rank","required":["kind","rank"],"properties":{"kind":{"const":"preferred_rank"},"rank":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"distance","required":["kind","value"],"properties":{"kind":{"const":"distance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"yard_vehicle","required":["count","kind"],"properties":{"count":{"$ref":"#/components/schemas/u32"},"kind":{"const":"yard_vehicle"}}}]},"supply_ranker.bayesian_v1.PartFactor":{"oneOf":[{"type":"object","title":"coverage","required":["kind"],"properties":{"kind":{"const":"coverage"}}},{"type":"object","title":"track_record_rate","required":["denominator","kind","numerator"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"kind":{"const":"track_record_rate"},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}}}}]},"supply_ranker.bayesian_v1.PartFactorPolicy":{"oneOf":[{"type":"object","title":"coverage","required":["kind","missing","unknown_stock_credit","weight"],"properties":{"kind":{"const":"coverage"},"missing":{"$ref":"#/components/schemas/std.string.String"},"unknown_stock_credit":{"$ref":"#/components/schemas/std.string.String"},"weight":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"track_record_rate","required":["denominator","direction","kind","missing","numerator","prior","scope_chain","weight"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.PartScopedMeasure"}},"direction":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Direction"},"kind":{"const":"track_record_rate"},"missing":{"$ref":"#/components/schemas/std.string.String"},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.PartScopedMeasure"}},"prior":{"$ref":"#/components/schemas/std.string.String"},"scope_chain":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.PartScopeKind"}},"weight":{"$ref":"#/components/schemas/std.string.String"}}}]},"supply_ranker.bayesian_v1.PartObservation":{"oneOf":[{"type":"object","title":"coverage","required":["kind","sufficient","total","unknown_stock"],"properties":{"kind":{"const":"coverage"},"sufficient":{"$ref":"#/components/schemas/u32"},"total":{"$ref":"#/components/schemas/u32"},"unknown_stock":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"track_record_rate","required":["aggregate","kind","parts"],"properties":{"aggregate":{"$ref":"#/components/schemas/std.string.String"},"kind":{"const":"track_record_rate"},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.PartSource"}}}}]},"supply_ranker.bayesian_v1.PartScoreComponent":{"type":"object","title":"supply_ranker.bayesian_v1.PartScoreComponent","required":["factor","normalised","observed","weight"],"properties":{"factor":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.PartFactor"},"normalised":{"$ref":"#/components/schemas/std.string.String"},"observed":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.PartObservation"},"weight":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.bayesian_v1.PartSource":{"type":"object","title":"supply_ranker.bayesian_v1.PartSource","required":["hca","provenance","smoothed","successes","trials"],"properties":{"hca":{"$ref":"#/components/schemas/std.string.String"},"provenance":{"$ref":"#/components/schemas/supply_ranker.Provenance"},"smoothed":{"$ref":"#/components/schemas/std.string.String"},"successes":{"$ref":"#/components/schemas/u64"},"trials":{"$ref":"#/components/schemas/u64"}}},"supply_ranker.bayesian_v1.ScoreComponent":{"type":"object","title":"supply_ranker.bayesian_v1.ScoreComponent","required":["factor","normalised","observed","weight"],"properties":{"factor":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Factor"},"normalised":{"$ref":"#/components/schemas/std.string.String"},"observed":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Observation"},"weight":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.bayesian_v1.Smoothing":{"type":"object","title":"supply_ranker.bayesian_v1.Smoothing","required":["strength"],"properties":{"strength":{"$ref":"#/components/schemas/std.string.String"}}},"supply_ranker.bayesian_v1.input.Policy":{"type":"object","title":"supply_ranker.bayesian_v1.input.Policy","required":["factors","lookbacks","part_factors","smoothing"],"properties":{"factors":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.FactorPolicy"}},"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.input.Group"}},"lookbacks":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Lookbacks"},"part_factors":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.PartFactorPolicy"}},"smoothing":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Smoothing"}}},"supply_ranker.bayesian_v1.output.Policy":{"type":"object","title":"supply_ranker.bayesian_v1.output.Policy","required":["factors","lookbacks","part_factors","smoothing"],"properties":{"factors":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.FactorPolicy"}},"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.output.Group"}},"lookbacks":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Lookbacks"},"part_factors":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.PartFactorPolicy"}},"smoothing":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.Smoothing"}}},"supply_ranker.discovery_v1.Allocation":{"type":"object","title":"supply_ranker.discovery_v1.Allocation","required":["decided_by","position","sort"],"properties":{"decided_by":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.DecidedBy"},"enforcement":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Enforcement"}]},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"position":{"$ref":"#/components/schemas/u32"},"sort":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.SortValue"}}}},"supply_ranker.discovery_v1.DecidedBy":{"oneOf":[{"const":"keys"},{"const":"supplier_identity"}]},"supply_ranker.discovery_v1.DistanceThreshold":{"type":"object","title":"supply_ranker.discovery_v1.DistanceThreshold","required":["max","unit"],"properties":{"max":{"$ref":"#/components/schemas/std.string.String"},"unit":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.DistanceUnit"}}},"supply_ranker.discovery_v1.DistanceUnit":{"oneOf":[{"const":"km"},{"const":"mi"}]},"supply_ranker.discovery_v1.Enforcement":{"oneOf":[{"const":"mandatory"}]},"supply_ranker.discovery_v1.Evidence":{"type":"object","title":"supply_ranker.discovery_v1.Evidence","required":["groups"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.GroupOutcome"}}}},"supply_ranker.discovery_v1.GroupOutcome":{"oneOf":[{"type":"object","title":"inactive","required":["group","outcome"],"properties":{"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"inactive"}}},{"type":"object","title":"claimed","required":["by","group","outcome"],"properties":{"by":{"$ref":"#/components/schemas/u32"},"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"claimed"}}},{"type":"object","title":"not_matched","required":["atoms","group","outcome"],"properties":{"atoms":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"supply_ranker.AtomOutcome<supply_ranker.FilterObservation>","required":["observed","path","truth"],"properties":{"observed":{"$ref":"#/components/schemas/supply_ranker.FilterObservation"},"path":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/u32"}},"truth":{"$ref":"#/components/schemas/supply_ranker.Truth"}}}},"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"not_matched"}}},{"type":"object","title":"matched","required":["atoms","group","outcome","placement"],"properties":{"atoms":{"description":"Expandable array type","type":"array","items":{"type":"object","title":"supply_ranker.AtomOutcome<supply_ranker.FilterObservation>","required":["observed","path","truth"],"properties":{"observed":{"$ref":"#/components/schemas/supply_ranker.FilterObservation"},"path":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/u32"}},"truth":{"$ref":"#/components/schemas/supply_ranker.Truth"}}}},"group":{"$ref":"#/components/schemas/u32"},"outcome":{"const":"matched"},"placement":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Placement"}}}]},"supply_ranker.discovery_v1.Job":{"type":"object","title":"supply_ranker.discovery_v1.Job","required":["groups"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.GroupActivation"}}}},"supply_ranker.discovery_v1.Lookbacks":{"type":"object","title":"supply_ranker.discovery_v1.Lookbacks","required":["min_trials","windows"],"properties":{"min_trials":{"$ref":"#/components/schemas/u64"},"windows":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.lookback.Lookback"}}}},"supply_ranker.discovery_v1.OrderKey":{"oneOf":[{"type":"object","title":"asc","required":["asc"],"properties":{"asc":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.SortField"}}},{"type":"object","title":"desc","required":["desc"],"properties":{"desc":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.SortField"}}}]},"supply_ranker.discovery_v1.Placement":{"oneOf":[{"type":"object","title":"supply_ranker.discovery_v1.Allocation","required":["decided_by","kind","position","sort"],"properties":{"decided_by":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.DecidedBy"},"enforcement":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Enforcement"}]},"kind":{"const":"allocated"},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"position":{"$ref":"#/components/schemas/u32"},"sort":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.SortValue"}}}},{"type":"object","title":"withheld","required":["kind"],"properties":{"kind":{"const":"withheld"}}}]},"supply_ranker.discovery_v1.SortField":{"oneOf":[{"type":"object","title":"distance","required":["field"],"properties":{"field":{"const":"distance"}}},{"type":"object","title":"preferred_rank","required":["field"],"properties":{"field":{"const":"preferred_rank"}}},{"type":"object","title":"stock_matches","required":["field"],"properties":{"field":{"const":"stock_matches"}}},{"type":"object","title":"yard_vehicle_count","required":["field"],"properties":{"field":{"const":"yard_vehicle_count"}}},{"type":"object","title":"zone_affinity","required":["field"],"properties":{"field":{"const":"zone_affinity"}}},{"type":"object","title":"metrics_rate","required":["denominator","field","numerator","scope"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"field":{"const":"metrics_rate"},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"scope":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"}}},{"type":"object","title":"metrics_duration","required":["field","measure","scope","statistic"],"properties":{"field":{"const":"metrics_duration"},"measure":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"},"scope":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"},"statistic":{"$ref":"#/components/schemas/supply_ranker.Statistic"}}}]},"supply_ranker.discovery_v1.SortObservation":{"oneOf":[{"type":"object","title":"distance","required":["field","observed"],"properties":{"field":{"const":"distance"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"type":"object","title":"preferred_rank","required":["field","observed"],"properties":{"field":{"const":"preferred_rank"},"observed":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},{"type":"object","title":"stock_matches","required":["field","observed"],"properties":{"field":{"const":"stock_matches"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"yard_vehicle_count","required":["field","observed"],"properties":{"field":{"const":"yard_vehicle_count"},"observed":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"metrics_rate","required":["field","observed"],"properties":{"field":{"const":"metrics_rate"},"observed":{"type":"object","title":"supply_ranker.Metric<rust_decimal.Decimal>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/supply_ranker.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}}}},{"type":"object","title":"metrics_duration","required":["field","observed"],"properties":{"field":{"const":"metrics_duration"},"observed":{"type":"object","title":"supply_ranker.Metric<supply_ranker.Seconds>","required":["provenance","value"],"properties":{"provenance":{"$ref":"#/components/schemas/supply_ranker.Provenance"},"value":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Seconds"}]}}}}},{"type":"object","title":"zone_affinity","required":["field","repairer","supplier"],"properties":{"field":{"const":"zone_affinity"},"repairer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Zone"}]},"supplier":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.Zone"}}}}]},"supply_ranker.discovery_v1.SortValue":{"type":"object","title":"supply_ranker.discovery_v1.SortValue","required":["key","observed"],"properties":{"key":{"$ref":"#/components/schemas/u32"},"observed":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.SortObservation"}}},"supply_ranker.discovery_v1.StockPresence":{"oneOf":[{"const":"in_stock"},{"const":"no_stock"}]},"supply_ranker.discovery_v1.input.FilterAtom":{"oneOf":[{"type":"object","title":"supply_type","required":["type","value"],"properties":{"type":{"const":"supply_type"},"value":{"$ref":"#/components/schemas/supply_ranker.SupplyType"}}},{"type":"object","title":"supply_type_only","required":["type","values"],"properties":{"type":{"const":"supply_type_only"},"values":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.SupplyType"}}}},{"type":"object","title":"preferred","required":["type"],"properties":{"type":{"const":"preferred"}}},{"type":"object","title":"preferred_rank","required":["type","value"],"properties":{"type":{"const":"preferred_rank"},"value":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.input.PreferredRankRange"}}},{"type":"object","title":"distance","required":["type","value"],"properties":{"type":{"const":"distance"},"value":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.DistanceThreshold"}}},{"type":"object","title":"has_stock","required":["type"],"properties":{"type":{"const":"has_stock"}}},{"type":"object","title":"has_yard_vehicle","required":["type"],"properties":{"type":{"const":"has_yard_vehicle"}}},{"type":"object","title":"yard_vehicle_count","required":["threshold","type"],"properties":{"threshold":{"oneOf":[{"type":"object","title":"min<u32>","required":["op","value"],"properties":{"op":{"const":"min"},"value":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"max<u32>","required":["op","value"],"properties":{"op":{"const":"max"},"value":{"$ref":"#/components/schemas/u32"}}}]},"type":{"const":"yard_vehicle_count"}}},{"type":"object","title":"same_zone","required":["type"],"properties":{"type":{"const":"same_zone"}}},{"type":"object","title":"supplier","required":["ids","type"],"properties":{"ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}},"type":{"const":"supplier"}}},{"type":"object","title":"metrics_rate","required":["denominator","numerator","scope","threshold","type"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"scope":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"},"threshold":{"oneOf":[{"type":"object","title":"min<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"min"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"max<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"max"},"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"type":{"const":"metrics_rate"}}},{"type":"object","title":"metrics_duration","required":["measure","scope","statistic","threshold","type"],"properties":{"measure":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"},"scope":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"},"statistic":{"$ref":"#/components/schemas/supply_ranker.Statistic"},"threshold":{"oneOf":[{"type":"object","title":"min<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"min"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"max<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"max"},"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"type":{"const":"metrics_duration"}}}]},"supply_ranker.discovery_v1.input.Group":{"type":"object","title":"supply_ranker.discovery_v1.input.Group","required":["label","order","who"],"properties":{"enforcement":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Enforcement"}]},"label":{"$ref":"#/components/schemas/std.string.String"},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"order":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.OrderKey"}},"when":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Condition"}]},"who":{"$ref":"#/components/schemas/supply_ranker.input.Filter"}}},"supply_ranker.discovery_v1.input.Policy":{"type":"object","title":"supply_ranker.discovery_v1.input.Policy","required":["groups"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.input.Group"}},"lookbacks":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Lookbacks"}]}}},"supply_ranker.discovery_v1.input.PreferredRankRange":{"type":"object","title":"supply_ranker.discovery_v1.input.PreferredRankRange","required":["max","min"],"properties":{"max":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"min":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"supply_ranker.discovery_v1.output.FilterAtom":{"oneOf":[{"type":"object","title":"supply_type","required":["type","value"],"properties":{"type":{"const":"supply_type"},"value":{"$ref":"#/components/schemas/supply_ranker.SupplyType"}}},{"type":"object","title":"supply_type_only","required":["type","values"],"properties":{"type":{"const":"supply_type_only"},"values":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.SupplyType"}}}},{"type":"object","title":"preferred","required":["type"],"properties":{"type":{"const":"preferred"}}},{"type":"object","title":"preferred_rank","required":["type","value"],"properties":{"type":{"const":"preferred_rank"},"value":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.output.PreferredRankRange"}}},{"type":"object","title":"distance","required":["type","value"],"properties":{"type":{"const":"distance"},"value":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.DistanceThreshold"}}},{"type":"object","title":"has_stock","required":["type"],"properties":{"type":{"const":"has_stock"}}},{"type":"object","title":"has_yard_vehicle","required":["type"],"properties":{"type":{"const":"has_yard_vehicle"}}},{"type":"object","title":"yard_vehicle_count","required":["threshold","type"],"properties":{"threshold":{"oneOf":[{"type":"object","title":"min<u32>","required":["op","value"],"properties":{"op":{"const":"min"},"value":{"$ref":"#/components/schemas/u32"}}},{"type":"object","title":"max<u32>","required":["op","value"],"properties":{"op":{"const":"max"},"value":{"$ref":"#/components/schemas/u32"}}}]},"type":{"const":"yard_vehicle_count"}}},{"type":"object","title":"same_zone","required":["type"],"properties":{"type":{"const":"same_zone"}}},{"type":"object","title":"supplier","required":["ids","type"],"properties":{"ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}},"type":{"const":"supplier"}}},{"type":"object","title":"metrics_rate","required":["denominator","numerator","scope","threshold","type"],"properties":{"denominator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"numerator":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"}},"scope":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"},"threshold":{"oneOf":[{"type":"object","title":"min<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"min"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"max<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"max"},"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"type":{"const":"metrics_rate"}}},{"type":"object","title":"metrics_duration","required":["measure","scope","statistic","threshold","type"],"properties":{"measure":{"$ref":"#/components/schemas/supplier_metrics_api.measure.Measure"},"scope":{"$ref":"#/components/schemas/supply_ranker.SupplierScope"},"statistic":{"$ref":"#/components/schemas/supply_ranker.Statistic"},"threshold":{"oneOf":[{"type":"object","title":"min<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"min"},"value":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"max<rust_decimal.Decimal>","required":["op","value"],"properties":{"op":{"const":"max"},"value":{"$ref":"#/components/schemas/std.string.String"}}}]},"type":{"const":"metrics_duration"}}}]},"supply_ranker.discovery_v1.output.Group":{"type":"object","title":"supply_ranker.discovery_v1.output.Group","required":["label","order","who"],"properties":{"enforcement":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Enforcement"}]},"label":{"$ref":"#/components/schemas/std.string.String"},"limit":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"order":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.OrderKey"}},"when":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Condition"}]},"who":{"$ref":"#/components/schemas/supply_ranker.output.Filter"}}},"supply_ranker.discovery_v1.output.Policy":{"type":"object","title":"supply_ranker.discovery_v1.output.Policy","required":["groups"],"properties":{"groups":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.output.Group"}},"lookbacks":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.Lookbacks"}]}}},"supply_ranker.discovery_v1.output.PreferredRankRange":{"type":"object","title":"supply_ranker.discovery_v1.output.PreferredRankRange","properties":{"max":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"min":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]}}},"supply_ranker.input.Filter":{"oneOf":[{"type":"object","title":"true","required":["type"],"properties":{"type":{"const":"true"}}},{"type":"object","title":"and","required":["of","type"],"properties":{"of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.input.Filter"}},"type":{"const":"and"}}},{"type":"object","title":"or","required":["of","type"],"properties":{"of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.input.Filter"}},"type":{"const":"or"}}},{"type":"object","title":"not","required":["of","type"],"properties":{"of":{"$ref":"#/components/schemas/supply_ranker.input.Filter"},"type":{"const":"not"}}},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.input.FilterAtom"}]},"supply_ranker.input.Policy":{"oneOf":[{"type":"object","title":"bayesian_v1","required":["ranking","schema"],"properties":{"orchestration":{"$ref":"#/components/schemas/supply_ranker.Orchestration"},"ranking":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.input.Policy"},"schema":{"const":"bayesian_v1"}}},{"type":"object","title":"discovery_v1","required":["ranking","schema"],"properties":{"orchestration":{"$ref":"#/components/schemas/supply_ranker.Orchestration"},"ranking":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.input.Policy"},"schema":{"const":"discovery_v1"}}}]},"supply_ranker.input.PolicyContext":{"type":"object","title":"supply_ranker.input.PolicyContext","required":["insurer","market","repairer","site"],"properties":{"insurer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}]},"job_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.JobKind"}]},"make":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"market":{"$ref":"#/components/schemas/iso_country.CountryCode"},"model":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"repairer":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"},"site":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"vehicle_age_months":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"zone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Zone"}]}}},"supply_ranker.output.Filter":{"oneOf":[{"type":"object","title":"true","required":["type"],"properties":{"type":{"const":"true"}}},{"type":"object","title":"and","required":["of","type"],"properties":{"of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.output.Filter"}},"type":{"const":"and"}}},{"type":"object","title":"or","required":["of","type"],"properties":{"of":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/supply_ranker.output.Filter"}},"type":{"const":"or"}}},{"type":"object","title":"not","required":["of","type"],"properties":{"of":{"$ref":"#/components/schemas/supply_ranker.output.Filter"},"type":{"const":"not"}}},{"$ref":"#/components/schemas/supply_ranker.discovery_v1.output.FilterAtom"}]},"supply_ranker.output.Policy":{"oneOf":[{"type":"object","title":"bayesian_v1","required":["orchestration","ranking","schema"],"properties":{"orchestration":{"$ref":"#/components/schemas/supply_ranker.Orchestration"},"ranking":{"$ref":"#/components/schemas/supply_ranker.bayesian_v1.output.Policy"},"schema":{"const":"bayesian_v1"}}},{"type":"object","title":"discovery_v1","required":["orchestration","ranking","schema"],"properties":{"orchestration":{"$ref":"#/components/schemas/supply_ranker.Orchestration"},"ranking":{"$ref":"#/components/schemas/supply_ranker.discovery_v1.output.Policy"},"schema":{"const":"discovery_v1"}}}]},"supply_ranker.output.PolicyContext":{"type":"object","title":"supply_ranker.output.PolicyContext","required":["insurer","job_kind","make","market","model","repairer","site","vehicle_age_months","zone"],"properties":{"insurer":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.BusinessRef"}]},"job_kind":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.JobKind"}]},"make":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"market":{"$ref":"#/components/schemas/iso_country.CountryCode"},"model":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"repairer":{"$ref":"#/components/schemas/supply_ranker.BusinessRef"},"site":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"vehicle_age_months":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"zone":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/supply_ranker.Zone"}]}}},"system.SystemVersionInfo":{"type":"object","title":"system.SystemVersionInfo","required":["revision"],"properties":{"revision":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.AiPipelineConfigNullable":{"description":"AiPipelineConfigNullable","type":"object","title":"tier1.AiPipelineConfigNullable","properties":{"context_selection":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.CollisionContextSelectionConfig"}]},"damaged_parts":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.DamagedPartsAnalysisConfig"}]},"image_relevance":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.ImageRelevanceAnalysisConfig"}]},"model":{"description":"Override the model for all steps. When set, takes precedence over per-step model fields.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oem_mapping":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.OemMappingConfig"}]}}},"tier1.AiPipelineInput":{"description":"AiPipelineInput","type":"object","title":"tier1.AiPipelineInput","required":["diagrams","images"],"properties":{"audio_uri":{"description":"Optional URI to an audio file describing the damage","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagrams":{"description":"Vehicle OEM diagrams and parts for step 3 mapping","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.MlServerApiV1SchemaPredictionsAiEstimationDiagramDefinition"}},"images":{"description":"Input vehicle images for step 1a relevance analysis","type":"array","items":{"$ref":"#/components/schemas/tier1.ImageItem"}},"job_text":{"description":"Optional job text describing the damage","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"max_images":{"description":"Maximum number of relevant images to pass from step 1 to step 2","$ref":"#/components/schemas/u64"},"prediction_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.AiPipelinePredictionType"}]},"vehicle_info":{"description":"Optional vehicle context (e.g. '2019 Toyota Camry 2.5L SE') passed to step 3 for trim/variant-aware OEM matching","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vin":{"description":"Vehicle VIN used for cache correlation. Falls back to metadata vin/request_vin/vehicle_vin if omitted.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.AiPipelineOutput":{"description":"AiPipelineOutput","type":"object","title":"tier1.AiPipelineOutput","required":["job_summary","status"],"properties":{"job_summary":{"$ref":"#/components/schemas/std.string.String"},"oem_diagrams":{"description":"Source images grouped with associated OEM diagrams (high recall)","type":"array","items":{"$ref":"#/components/schemas/tier1.OemDiagramGroup"}},"oem_parts":{"description":"Recommended parts grouped with associated OEM parts (high precision)","type":"array","items":{"$ref":"#/components/schemas/tier1.OemPartGroup"}},"raw_damaged_parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.RecommendedPart"}},"relevant_images":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.ImageRelevanceResult"}},"request_id":{"description":"Present for queued background requests","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"status":{"$ref":"#/components/schemas/tier1.Status"},"step_metadata":{"description":"Per-step execution metadata for realtime requests (step_1=job context selection, step_2=damaged parts, step_3=OEM mapping)","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.ExecutionMetadata"}}]}}},"tier1.AiPipelinePredictionType":{"oneOf":[{"const":"realtime"},{"const":"background"}]},"tier1.AiPipelineRequest":{"description":"AiPipelineRequest","type":"object","title":"tier1.AiPipelineRequest","required":["data"],"properties":{"config":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.AiPipelineConfigNullable"}]},"data":{"$ref":"#/components/schemas/tier1.AiPipelineInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.AiPipelineResponse":{"description":"AiPipelineResponse","type":"object","title":"tier1.AiPipelineResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.AiPipelineOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.AnnotationKind":{"oneOf":[{"const":"pnc","description":"Part Number Code — a labeled part."},{"const":"pnc_distant","description":"PNC with callout far from the part."},{"const":"reference","description":"Figure/diagram reference label."},{"const":"symbol","description":"A non-text symbol in the diagram."},{"const":"text","description":"Textual content in the diagram."},{"const":"line","description":"A leader/callout line."},{"const":"box","description":"A callout or label box."},{"const":"erase","description":"Region to be erased/whited out."},{"const":"unknown","description":"Unrecognized kind from upstream data."}]},"tier1.AnnotationObject":{"description":"A single annotated object within a diagram.\n\nObject Kinds\n\nThe [`AnnotationKind`] enum determines the semantic role of the object and\nwhich fields are meaningful. See its documentation for the full breakdown.\n\nLinks -- Object-to-Object Relationship Graph\n\nThe links field forms a directed graph of object-to-object references within\na single diagram. Each UUID in the links array refers to the object_id of\nanother AnnotationObject in the same DiagramAnnotation.\n\nSemantics:\n\nLinks represent assembly/sub-assembly parent-child relationships. When a PNC\nobject's links array contains other object IDs, those objects are its\nchildren in the assembly hierarchy. The ML linking model (parameterized by\nlink threshold, batch size, and closest-object count) produces these\nrelationships by analyzing spatial proximity and visual cues in the diagram.\n\nHow frontends consume links:\n\nAssembly tree construction -- The interactive diagram worker resolves the\nlink graph into a hierarchical tree of hotspots. Each PNC's links become its\nchildren, and the tree is built recursively via buildAssemblyHotspot() to\nrepresent nested sub-assemblies.\n\nMask aggregation -- When highlighting a part, the frontend collects\nfuture_masks from both the PNC object and all objects it links to,\nconcatenating them to form a complete highlight region.\n\nVisual link lines (QA tool) -- The annotation QA tool draws lines from the\ncenter of a parent object to the center of each child, allowing annotators\nto inspect and edit the link graph.\n\nLink editing (QA tool) -- Annotators can add/remove links by clicking\nobjects in linking mode. Links are validated before save to remove\nself-references, references to deleted objects, and dangling references.\n\nCoordinates -- Additional Geometry for Line/Box Objects\n\nThe coordinates field carries geometric data that goes beyond the\naxis-aligned bounding_box. It is a nested array: the outer Vec contains one\nor more shapes, and each inner Vec<Coordinate> is an ordered sequence of\npoints defining that shape.","type":"object","title":"tier1.AnnotationObject","required":["bounding_box","object_id"],"properties":{"bounding_box":{"description":"Axis-aligned bounding box enclosing the object.","$ref":"#/components/schemas/tier1.output.BoundingBox"},"code":{"description":"Object code (e.g., PNC code or reference code).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"coordinates":{"description":"Additional geometric data for \"line\" and \"box\" kind objects.\n\nEach inner Vec<Coordinate> is a shape: a polyline (for lines) or a\nclosed polygon (for boxes). The outer Vec allows multiple shapes per\nobject. Empty for PNC, reference, symbol, and text objects.\n\nLine polylines are open and should not be closed. Box polygons may or\nmay not be self-closing (last point == first point) depending on the\ndata source; consumers should defensively close them if needed.\n\nSee struct-level docs for full details and examples.","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.output.Coordinate"}}},"description":{"description":"Human-readable description of the object.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"future_masks":{"description":"Polygon masks for precise object boundaries.\n\nEach inner Vec represents a single polygon as an ordered sequence of\nvertex coordinates. The polygons are NOT self-closing -- the last point\nis not a repeat of the first. Consumers must close them.\nUsed for pixel-accurate part highlighting -- when a PNC is selected,\nits future_masks (plus those of linked objects) are filled to show the part's exact silhouette.","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.output.Coordinate"}}},"kind":{"description":"Object kind — determines the semantic role and which fields are meaningful.\n\nSee [`AnnotationKind`] for the full list of variants and their semantics.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.AnnotationKind"}]},"links":{"description":"IDs of other AnnotationObjects in the same diagram that this object is\nlinked to.\n\nForms a directed graph representing assembly/sub-assembly parent-child\nrelationships. Each UUID corresponds to the object_id of another object\nin the same DiagramAnnotation. Primarily used by \"pnc\" and \"pnc_distant\"\nobjects; see struct-level docs for full details.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"mask_info":{"description":"Per-mask text labels — each inner vec corresponds to the mask at the same index in\n`future_masks`. Empty inner vecs indicate no label for that mask.","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}},"object_id":{"description":"Unique identifier for this object within the diagram.","$ref":"#/components/schemas/uuid.Uuid"},"origin_info":{"description":"Text label per origin, parallel to `origins`.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"origins":{"description":"Origin polygons for this part on the diagram, one per linked Origin annotation.","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.output.Coordinate"}}},"part_info":{"description":"Text labels derived from annotations linked to this object (e.g. [\"Type A\", \"Steel\"]).","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"part_relationship":{"description":"IDs of PNC objects that share a part relationship with this object.","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"tier1.AssembliesEnrichment":{"oneOf":[{"const":"rephrased_descriptions"},{"const":"disambiguations"}]},"tier1.AssembliesSearchConfig":{"description":"Configuration controlling which enrichment features are applied and how\nassemblies are represented in the search response.\n\nEnable or disable individual features to tailor result richness, performance, and\ninference quality. Features that add data (e.g. predictions, disambiguations) may\nincrease processing time. All flags are optional but disabling many of them will\nproduce a more basic raw EPC-style result.","type":"object","title":"tier1.AssembliesSearchConfig","required":["dataqa_insert","disambiguations","external_url_to_pnc_codes","image_segmentation","is_dataqa_user","ml_predictions","ml_threshold","mpn_type","notes_interpretation","position_prediction","priority","rephrased_descriptions","world_tree"],"properties":{"apply_diagram_hide_list":{"description":"When false, the diagram hide list filter is skipped and all diagrams are returned.","$ref":"#/components/schemas/bool"},"auto_denylist":{"description":"Automatically deny external providers that consistently return no useful data for this VIN.","deprecated":true,"$ref":"#/components/schemas/bool"},"dataqa_insert":{"description":"Records build sheet data for internal QA analytics (no effect on visible search content).","$ref":"#/components/schemas/bool"},"disambiguations":{"description":"Resolves ambiguous variants (e.g. side-specific parts) so results are clearer.","$ref":"#/components/schemas/bool"},"external_url_to_pnc_codes":{"description":"Attempts to link external catalog/image URLs to known PNC codes for enrichment.","$ref":"#/components/schemas/bool"},"fill_std_note_from_raw":{"description":"Creates a standardized note from raw note properties if a suitable mapping exists.","deprecated":true,"$ref":"#/components/schemas/bool"},"image_segmentation":{"description":"Generates segmentation metadata for diagrams (used by downstream image features).","$ref":"#/components/schemas/bool"},"ingest_oem_image":{"description":"When `false`, the ingest-oem-image Kafka dispatch is skipped during\ndiagram preparation. Tests use this to avoid flooding the topic with\nunreachable external OEM URLs.","$ref":"#/components/schemas/bool"},"is_dataqa_user":{"description":"Temporary marker for DataQA users (internal usage; typical callers can ignore).","$ref":"#/components/schemas/bool"},"languages":{"description":"Ordered list of preferred languages for localized textual fields. Empty => default language.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"ml_predictions":{"description":"Adds inferred part variants and related ML-derived insights.","$ref":"#/components/schemas/bool"},"ml_threshold":{"description":"Minimum confidence threshold; lower-confidence ML outputs below this are omitted.","$ref":"#/components/schemas/tier1.MlThreshold"},"mpn_type":{"description":"Selects the representation of manufacturer part numbers: raw OEM, normalized canonical form,\nor obfuscated for restricted contexts.","$ref":"#/components/schemas/tier1.AssembliesSearchMpnType"},"notes_interpretation":{"description":"Converts raw OEM notes into structured interpreted notes when possible.","$ref":"#/components/schemas/bool"},"only_base_part":{"description":"When true then the response will only include MPN's without colour / variant codes.","$ref":"#/components/schemas/bool"},"partial_results":{"description":"When `true`, a search whose tree is ready but whose LLM enrichments (rephrased\ndescriptions, part-variant disambiguation) are still running answers `in_progress`\nwith the tree attached as `partial`, so the caller can render it and keep polling.\nWhen `false` (default), `in_progress` carries nothing and `completed` is only\nreturned once the enrichments have landed or been given up on.","$ref":"#/components/schemas/bool"},"position_prediction":{"description":"Estimates missing diagram positions when source data lacks coordinates.","$ref":"#/components/schemas/bool"},"priority":{"description":"Queue priority for this search.","$ref":"#/components/schemas/tier1.Priority"},"receive_raw_properties":{"description":"Whether to include raw properties in the response.","$ref":"#/components/schemas/bool"},"refresh":{"description":"DataQA o2t staff refresh depth: how far to bypass the EPC caches.\nRestricted to Partly staff (dropped to `Cached` for non-staff callers).","$ref":"#/components/schemas/tier1.EpcRefresh"},"rephrased_descriptions":{"description":"Produces cleaner, standardized part descriptions for improved readability.","$ref":"#/components/schemas/bool"},"request_source":{"description":"The source of the request.","$ref":"#/components/schemas/tier1.RequestSource"},"resolve_supersession_chains":{"description":"When `true` (default), resolves supersession chains to their sink nodes — equivalent to\nthe pre-graph behaviour where EPC providers resolved supersessions before returning results.\nWhen `false`, returns all parts including superseded ones.","$ref":"#/components/schemas/bool"},"vertex_service_mechanical":{"description":"When `true`, routes ML prediction requests to the vertex-service-mechanical model.\nMust be explicitly enabled; defaults to `false`.","$ref":"#/components/schemas/bool"},"world_tree":{"description":"Includes human-centric world tree hierarchy giving contextual grouping of assemblies.","$ref":"#/components/schemas/bool"}}},"tier1.AssembliesSearchError":{"oneOf":[{"description":"The request could not be authenticated. Check your API credentials.","type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden","description":"You do not have permission to access this resource."},{"const":"not_found","description":"No assemblies were found for the given vehicle."},{"const":"vin_denylisted","description":"This VIN has been blocked. Contact support if you believe this is an error."},{"const":"vin_not_allowlisted","description":"This VIN requires explicit approval. Contact your account manager."},{"description":"The OEM vehicle ID provided is invalid.","type":"object","title":"invalid_oem_vehicle_id","required":["invalid_oem_vehicle_id"],"properties":{"invalid_oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"too_many_nodes","description":"The request would return too many nodes. Use more restrictive parameters."},{"description":"The VRM request parameters are invalid.","type":"object","title":"bad_vrm_request","required":["bad_vrm_request"],"properties":{"bad_vrm_request":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"The staff cache-refresh parameters are invalid (e.g. a freshness target\nthe server clock can never satisfy).","type":"object","title":"bad_refresh_request","required":["bad_refresh_request"],"properties":{"bad_refresh_request":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"Too many requests. Retry after the indicated delay.","type":"object","title":"rate_limited","required":["rate_limited"],"properties":{"rate_limited":{"description":"Too many requests. Retry after the indicated delay.","type":"object","title":"rate_limited","required":["message","retry_after"],"properties":{"message":{"description":"Operator-set guidance on how to get off the foreground path.\nServer-supplied so it can change without a client release.","$ref":"#/components/schemas/std.string.String"},"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}}]},"tier1.AssembliesSearchMpnType":{"oneOf":[{"const":"oem","description":"OEM format as ingested (may include formatting artifacts)."},{"const":"normalized","description":"Normalized canonical representation (cleaned / standardized for matching)."},{"const":"obfuscated","description":"Obfuscated representation (privacy / licensing restricted contexts)."}]},"tier1.AssembliesSearchPartial":{"description":"A usable assembly tree served ahead of its LLM enrichments. Same shape as\n`completed`, plus the list of what is still to come.","type":"object","title":"tier1.AssembliesSearchPartial","required":["gapc_brand_id","oem_vehicle_id","pending_enrichments"],"properties":{"assemblies":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.AssemblyV4"}},"diagrams":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.DiagramV3"}},"gapc_brand_id":{"description":"The [`GapcBrandSuid`] of the brand associated all part numbers in this response.","$ref":"#/components/schemas/std.string.String"},"oem_vehicle_id":{"description":"The [`OemVehicleId`] this response is for.","$ref":"#/components/schemas/std.string.String"},"pending_enrichments":{"description":"Enrichments still being computed, never empty here: descriptions are raw OEM\ntext until `rephrased_descriptions` lands, and part variants that\n`disambiguations` will drop are still present until it does.","type":"array","items":{"$ref":"#/components/schemas/tier1.AssembliesEnrichment"}},"root_nodes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"tier1.AssembliesSearchRequest":{"description":"Top-level request to search for assemblies for a vehicle.\nContains the vehicle identifier and feature/config toggles controlling enrichment of the response.","type":"object","title":"tier1.AssembliesSearchRequest","required":["config","oem_vehicle_id"],"properties":{"config":{"description":"Search-time configuration toggles (includes response-shaping and side-effect flags).","$ref":"#/components/schemas/tier1.AssembliesSearchConfig"},"oem_vehicle_id":{"description":"The OEM vehicle ID to search for assemblies for.","$ref":"#/components/schemas/std.string.String"}}},"tier1.AssembliesSearchResponse":{"oneOf":[{"type":"object","title":"in_progress","required":["in_progress"],"properties":{"in_progress":{"type":"object","title":"in_progress","required":["retry_after"],"properties":{"partial":{"description":"The tree so far, when the caller set `config.partial_results` and only the\nLLM enrichments are still outstanding. Absent while the search itself runs,\nand for callers that did not opt in.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.AssembliesSearchPartial"}]},"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"type":"object","title":"completed","required":["completed"],"properties":{"completed":{"type":"object","title":"completed","required":["gapc_brand_id","oem_vehicle_id"],"properties":{"assemblies":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.AssemblyV4"}},"diagrams":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.DiagramV3"}},"gapc_brand_id":{"description":"The [`GapcBrandSuid`] of the brand associated all part numbers in this response.","$ref":"#/components/schemas/std.string.String"},"oem_vehicle_id":{"description":"The [`OemVehicleId`] this response is for.","$ref":"#/components/schemas/std.string.String"},"root_nodes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}}}]},"tier1.AssembliesSubscribeRequest":{"description":"Request to open an assemblies subscribe stream.","type":"object","title":"tier1.AssembliesSubscribeRequest","required":["resume_point"],"properties":{"resume_point":{"description":"Resume from after this point; absent starts at the live tail (only\nevents produced after the subscription opens, no history replayed).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}},"tier1.AssembliesUpdate":{"oneOf":[{"const":"changed","description":"The vehicle's assemblies search has a new answer; search again."},{"const":"heartbeat","description":"Nothing changed; keeps idle proxies from closing the stream."}]},"tier1.AssembliesUpdatesRequest":{"description":"Request to open `assemblies.v4.updates.stream` for one vehicle.","type":"object","title":"tier1.AssembliesUpdatesRequest","required":["oem_vehicle_id"],"properties":{"oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.AssemblySubscribeEvent":{"description":"SSE frame emitted each time an assembly search completes.","type":"object","title":"tier1.AssemblySubscribeEvent","required":["kind","oem_vehicle_id","resume_point"],"properties":{"kind":{"$ref":"#/components/schemas/tier1.EventKind"},"oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"},"resume_point":{"$ref":"#/components/schemas/i64"}}},"tier1.AssemblySupersessionEdge":{"description":"One directed supersession edge attached to an [`AssemblyV4`]: the part is replaced\nby `successor` along this edge. Rendered from a [`tier1_model::core::SupersessionEdge`].\n\nJoint-replacement groups are not collapsed — each member is its own edge carrying the\nshared `group_id`, so a consumer reconstructs a group by bucketing edges that share it\n(a `None` `group_id` is a standalone alternative). This mirrors\n[`SupersessionListEntry`] but omits the redundant `mpn`/`data_source` (the `from` part is\nthis assembly; the source is the searched vehicle).","type":"object","title":"tier1.AssemblySupersessionEdge","required":["qualifier","quantity","successor"],"properties":{"group_id":{"description":"- `Some(id)` = this edge is one member of a joint-replacement group; edges sharing\nthe id form one group (AND semantics).\n- `None` = a standalone alternative (OR semantics).","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"note":{"description":"Free text for a person reading the edge, e.g. which of the part's own numbers an\nexact replacement is (\"Motorcraft part number\"). Display only.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"qualifier":{"description":"Why the part was superseded (the edge qualifier).","$ref":"#/components/schemas/tier1.Qualifier"},"quantity":{"description":"Quantity of `successor` this edge contributes (carried verbatim from the edge).","$ref":"#/components/schemas/u8"},"successor":{"description":"The replacing (\"to\") MPN for this edge, rendered per the request's `mpn_type`.","$ref":"#/components/schemas/std.string.String"}}},"tier1.AssemblyV4":{"type":"object","title":"tier1.AssemblyV4","properties":{"alternative_part_number":{"description":"An alternative part number of this assembly.","oneOf":[{"description":"Null","type":"null"},{"description":"Tuple holding 2 elements","type":"array","prefixItems":[{"$ref":"#/components/schemas/tier1.PartNumberKind"},{"$ref":"#/components/schemas/std.string.String"}]}]},"description":{"description":"A possible OEM description of the part, provided on the build sheet.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hca_source":{"description":"The source of the [`GapcHumanCentricAssemblySuid`] if available.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hca_world_tree_id":{"description":"The id of the [`GapcHumanCentricAssemblySuid`] representing the entry in the\n[`crate::world_tree::HCAWorldTree`].","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hotspot":{"description":"A hot spot on a diagram representing this part, segmentations should be requested\nseparately.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.DiagramHotspotV3"}]},"is_generic":{"description":"Whether or not this part is generic.\n\nGeneric parts are typically bolts, screws, clips, and other fasteners\nthat are not unique to a specific assembly. They are often used in\nmultiple assemblies and may not have a unique part number.\n\nThis field is primarily used to help with filtering and display logic in\nuser interfaces. When it is set the frontend should use the\n[`GapcPartTypeSuid`] to look up the part type and use it's display name\ninstead of the MPN or description.","$ref":"#/components/schemas/bool"},"manufacturer_part_number":{"description":"The original part number of this assembly if it exists.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oem_superseded_by":{"description":"Directed OEM supersession edges for this part, sourced from the EPC cache.\n\nOnly meaningful when the search was run with `resolve_supersession_chains: false`\n(otherwise superseded parts are dropped before this point). Three-state semantics\ncarried through from the cache:\n- `None`     — pre-supersession cache entry; supersession status unknown.\n- `Some([])` — authoritatively no supersessions.\n- `Some([..])` — one or more successor parts.\n\nSuccessor MPNs are rendered in the same representation as the rest of this\nassembly (per the request's `mpn_type`).","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.AssemblySupersessionEdge"}}]},"position":{"description":"A possible position for the part, if available in the EPC.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Position"}]},"quantity":{"description":"The quantity of this part in the assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"raw_properties":{"description":"Raw properties of the part, used in encoding the MPN don't show in the FE","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}]},"std_note":{"description":"The standard note associated with this assembly. This note is displayed in the UI when a disambiguation is needed.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"sub_assembly_ids":{"description":"Nested sub-assemblies. If there are multiple undifferentiated parts for a single\npart slot, they will be represented as variants.","type":"array","items":{"description":"An edge in the assembly graph, representing the relationship between a parent and child\n[`GapcAssembly`].","type":"object","title":"tier1.AssemblyEdge<uuid.Uuid>","required":["hca","id","oem"],"properties":{"hca":{"description":"Whether this link indicates a parent-child relationship in the HCA graph.","$ref":"#/components/schemas/bool"},"id":{"description":"The id of the child assembly being referenced.","$ref":"#/components/schemas/uuid.Uuid"},"oem":{"description":"Whether this link indicates an OEM relationship in the HCA graph.","$ref":"#/components/schemas/bool"}}}},"variant_group":{"description":"If the assembly has multiple variants, they will share a variant id. Otherwise this will be `None`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]}}},"tier1.AudioMimeType":{"oneOf":[{"const":"audio/mpeg"},{"const":"audio/wav"},{"const":"audio/mp4"},{"const":"audio/webm"}]},"tier1.AvailableProvidersResponse":{"type":"object","title":"tier1.AvailableProvidersResponse","required":["providers"],"properties":{"providers":{"description":"The providers that are available for the chassis number.","type":"array","items":{"$ref":"#/components/schemas/tier1.ProviderStatus"}}}},"tier1.BulkVisionAnnotationResponse":{"description":"BulkVisionAnnotationResponse","type":"object","title":"tier1.BulkVisionAnnotationResponse","required":["data","metadata"],"properties":{"data":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.VisionAnnotationDiagramDataOutput"}},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.CacheHandlerError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"}]},"tier1.CacheStatus":{"oneOf":[{"const":"low_priority_queue","description":"Queued for processing at low priority."},{"const":"high_priority_queue","description":"Queued for processing at high priority."},{"const":"completed","description":"Preparation has completed (fully or partially)."},{"const":"failed_fast_retry","description":"A previous attempt failed; queued for fast retry."},{"const":"failed_slow_retry","description":"A previous attempt failed; queued for slow retry."},{"const":"never_seen","description":"No cache entity exists for this key yet, it likely hasn't been prepared."},{"const":"processing","description":"We are currently processing this key."}]},"tier1.CollisionContextSelectionConfig":{"description":"CollisionContextSelectionConfig","type":"object","title":"tier1.CollisionContextSelectionConfig","properties":{"max_images":{"description":"Maximum number of images to select","$ref":"#/components/schemas/u64"},"model":{"$ref":"#/components/schemas/std.string.String"},"system_prompt":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.Confidence":{"oneOf":[{"const":"certain"},{"const":"high"},{"const":"medium"},{"const":"low"}]},"tier1.Config":{"oneOf":[{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},{"$ref":"#/components/schemas/tier1.StaticDiagramCategoryPredictionConfigNullable"},{"$ref":"#/components/schemas/tier1.MlDiagramCategoryPredictionConfigNullable"},{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}]},"tier1.ContextBasedDiagrams":{"description":"Final output: diagrams grouped by context (images and text).","type":"object","title":"tier1.ContextBasedDiagrams","properties":{"images":{"description":"Relevant diagrams per image context ID","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.ContextWithDiagrams"}},"text":{"description":"Relevant diagrams per text context ID","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.ContextWithDiagrams"}}}},"tier1.ContextWithDiagrams":{"description":"Per-context analysis result with relevant diagrams and their parts.","type":"object","title":"tier1.ContextWithDiagrams","required":["is_relevant"],"properties":{"is_relevant":{"$ref":"#/components/schemas/bool"},"relevant_diagrams":{"description":"All diagrams relevant for this context (direct + associated)","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramWithParts"}}}},"tier1.DamageContext":{"description":"Damage context grouped by image.","type":"object","title":"tier1.DamageContext","required":["context_text","image_uri"],"properties":{"context_text":{"description":"Short damage description (e.g., 'bumper crumpled', 'radiator bent')","$ref":"#/components/schemas/std.string.String"},"image_uri":{"description":"Image URI that shows this damage","$ref":"#/components/schemas/std.string.String"}}},"tier1.DamagedPartsAnalysisConfig":{"description":"DamagedPartsAnalysisConfig","type":"object","title":"tier1.DamagedPartsAnalysisConfig","properties":{"custom_code_meanings":{"description":"Custom repairer notation codes. If empty, uses defaults (N, Slide, PR, NCR).","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"model":{"description":"GenAI model. Must support vision.","$ref":"#/components/schemas/std.string.String"},"system_prompt":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DamagedPartsAnalysisConfigNullable":{"description":"DamagedPartsAnalysisConfigNullable","type":"object","title":"tier1.DamagedPartsAnalysisConfigNullable","properties":{"custom_code_meanings":{"description":"Custom repairer notation codes. If empty, uses defaults (N, Slide, PR, NCR).","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"model":{"description":"GenAI model. Must support vision.","$ref":"#/components/schemas/std.string.String"},"system_prompt":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DamagedPartsAnalysisInput":{"description":"DamagedPartsAnalysisInput","type":"object","title":"tier1.DamagedPartsAnalysisInput","required":["images"],"properties":{"audio_uri":{"description":"Optional URI to an audio file describing the damage","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"images":{"description":"Final image URIs to analyze (max 10). Use URIs from step 1 output, or direct URIs if skipping that step.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"job_text":{"description":"Optional job text describing the damage (e.g. repairer notes, claim description)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.DamagedPartsAnalysisOutput":{"description":"DamagedPartsAnalysisOutput","type":"object","title":"tier1.DamagedPartsAnalysisOutput","required":["recommended_parts","vehicle_damage_summary"],"properties":{"recommended_parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.RecommendedPart"}},"vehicle_damage_summary":{"description":"Holistic summary of all identified collision damage","$ref":"#/components/schemas/std.string.String"}}},"tier1.DamagedPartsAnalysisRequest":{"description":"DamagedPartsAnalysisRequest","type":"object","title":"tier1.DamagedPartsAnalysisRequest","required":["data"],"properties":{"config":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.DamagedPartsAnalysisConfigNullable"}]},"data":{"$ref":"#/components/schemas/tier1.DamagedPartsAnalysisInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.DamagedPartsAnalysisResponse":{"description":"DamagedPartsAnalysisResponse","type":"object","title":"tier1.DamagedPartsAnalysisResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.DamagedPartsAnalysisOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.DenyListUpdateRequest":{"description":"A request to denylist all providers not in the kept oem ids.","type":"object","title":"tier1.DenyListUpdateRequest","required":["kept_oem_vehicle_id"],"properties":{"kept_oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DenyListUpdateResponse":{"type":"object","title":"tier1.DenyListUpdateResponse","required":["update"],"properties":{"update":{"$ref":"#/components/schemas/tier1.VinDenyListUpdate"}}},"tier1.DiagramAnnotation":{"description":"Annotation data for a single diagram.","type":"object","title":"tier1.DiagramAnnotation","required":["diagram_id"],"properties":{"diagram_id":{"description":"Unique identifier for the diagram.","$ref":"#/components/schemas/std.string.String"},"objects":{"description":"Annotated objects detected in the diagram.","type":"array","items":{"$ref":"#/components/schemas/tier1.AnnotationObject"}}}},"tier1.DiagramAnnotationGetRequest":{"description":"Request to fetch vision annotation data for a diagram.\n\nIdentify the diagram by either `build_sheet_cache_id` or `diagram_url`.\nWhen both are given, `build_sheet_cache_id` is used. When neither is, the\nrequest identifies no diagram and returns `NotFound`.","type":"object","title":"tier1.DiagramAnnotationGetRequest","properties":{"build_sheet_cache_id":{"description":"The build sheet cache ID of the diagram. Takes precedence over\n`diagram_url`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]},"diagram_url":{"description":"The diagram image URL, for callers that hold one but no cache id.\nMatches either the OEM or the style-transferred image of a diagram.\n\nA URL is a weaker key than a cache ID: it is not unique in the\ncatalogue, so where one is available prefer `build_sheet_cache_id`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.DiagramAnnotationGetResponse":{"oneOf":[{"description":"Annotation data is not yet available — ML segmentation is in progress\nor has been enqueued. The caller should retry after the suggested\nduration.","type":"object","title":"in_progress","required":["in_progress"],"properties":{"in_progress":{"description":"Annotation data is not yet available — ML segmentation is in progress\nor has been enqueued. The caller should retry after the suggested\nduration.","type":"object","title":"in_progress","required":["retry_after"],"properties":{"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"description":"Annotation lookup is complete. The annotation may still be `None` if\nno data exists for this diagram (e.g. OEM-only data, which is excluded\nfrom the priority lookup).","type":"object","title":"completed","required":["completed"],"properties":{"completed":{"description":"Annotation lookup is complete. The annotation may still be `None` if\nno data exists for this diagram (e.g. OEM-only data, which is excluded\nfrom the priority lookup).","type":"object","title":"completed","properties":{"annotation":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.DiagramAnnotation"}]}}}}}]},"tier1.DiagramCategory":{"description":"DiagramCategory","type":"object","title":"tier1.DiagramCategory","required":["hca_id","level","sequence_code"],"properties":{"hca_id":{"$ref":"#/components/schemas/std.string.String"},"level":{"$ref":"#/components/schemas/std.string.String"},"sequence_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.DiagramCategoryInputItem":{"description":"DiagramCategoryInputItem","type":"object","title":"tier1.DiagramCategoryInputItem","required":["diagram_code","diagram_name","diagram_url"],"properties":{"diagram_code":{"$ref":"#/components/schemas/std.string.String"},"diagram_name":{"$ref":"#/components/schemas/std.string.String"},"diagram_url":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DiagramCategoryOutputItem":{"description":"DiagramCategoryOutputItem","type":"object","title":"tier1.DiagramCategoryOutputItem","required":["categories","diagram"],"properties":{"categories":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramCategory"}},"diagram":{"$ref":"#/components/schemas/tier1.DiagramCategoryInputItem"}}},"tier1.DiagramCategoryPredictionInput":{"description":"DiagramCategoryPredictionInput","type":"object","title":"tier1.DiagramCategoryPredictionInput","required":["diagrams","vehicle_make"],"properties":{"diagrams":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramCategoryInputItem"}},"vehicle_make":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DiagramCategoryPredictionOutput":{"description":"DiagramCategoryPredictionOutput","type":"object","title":"tier1.DiagramCategoryPredictionOutput","required":["diagrams"],"properties":{"diagrams":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramCategoryOutputItem"}}}},"tier1.DiagramCategoryPredictionRequest":{"description":"DiagramCategoryPredictionRequest","type":"object","title":"tier1.DiagramCategoryPredictionRequest","required":["data","metadata"],"properties":{"config":{"description":"Optional configuration by UUID, or a new config object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Config"}]},"data":{"$ref":"#/components/schemas/tier1.DiagramCategoryPredictionInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.DiagramCategoryPredictionResponse":{"description":"DiagramCategoryPredictionResponse","type":"object","title":"tier1.DiagramCategoryPredictionResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.DiagramCategoryPredictionOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.DiagramCode":{"description":"The identification code used for diagrams by EPC's.","type":"array","prefixItems":[{"$ref":"#/components/schemas/std.string.String"}]},"tier1.DiagramDv":{"description":"DiagramDv","type":"object","title":"tier1.DiagramDv","required":["code","identifier","name","note","parts"],"properties":{"code":{"$ref":"#/components/schemas/std.string.String"},"identifier":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/std.string.String"},"note":{"$ref":"#/components/schemas/std.string.String"},"page_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]},"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.PartDv"}},"total_pages":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i64"}]}}},"tier1.DiagramHandlerError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found","description":"The requested resource was not found."}]},"tier1.DiagramHotspotV3":{"description":"A polygon on a diagram, representing a part that can be cut out. Note that this polygon\nmay represent multiple GapcAssemblies.","type":"object","title":"tier1.DiagramHotspotV3","required":["code","diagram_id","x1","x2","y1","y2"],"properties":{"code":{"$ref":"#/components/schemas/std.string.String"},"diagram_id":{"$ref":"#/components/schemas/uuid.Uuid"},"x1":{"$ref":"#/components/schemas/u64"},"x2":{"$ref":"#/components/schemas/u64"},"y1":{"$ref":"#/components/schemas/u64"},"y2":{"$ref":"#/components/schemas/u64"}}},"tier1.DiagramImageUrlGetPollingStrategy":{"oneOf":[{"const":"wait","description":"Wait for all diagram image URLs of the associated diagram IDs to be available."},{"const":"immediate","description":"Do not wait, return immediately."}]},"tier1.DiagramImageUrlGetRequest":{"description":"A request to get diagram image URL from diagram ID.","type":"object","title":"tier1.DiagramImageUrlGetRequest","required":["polling_strategy"],"properties":{"build_sheet_cache_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"build_sheet_image_hash_ids":{"description":"Optional path to support query by the image hash","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"polling_strategy":{"$ref":"#/components/schemas/tier1.DiagramImageUrlGetPollingStrategy"},"receive_oem_image_url":{"description":"Only allowed if the client is authorized Partly staff. Otherwise, it should always be set to false.","$ref":"#/components/schemas/bool"}}},"tier1.DiagramImageUrlGetResponse":{"type":"object","title":"tier1.DiagramImageUrlGetResponse","required":["results"],"properties":{"results":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramLookupResult"}}}},"tier1.DiagramLookupResult":{"oneOf":[{"type":"object","title":"found","required":["build_sheet_cache_id","diagram_url","oem_diagram_hotspot_transformation"],"properties":{"build_sheet_cache_id":{"$ref":"#/components/schemas/uuid.Uuid"},"diagram_url":{"$ref":"#/components/schemas/std.string.String"},"oem_diagram_hotspot_transformation":{"$ref":"#/components/schemas/tier1.OemDiagramHotSpotTransformation"}}},{"type":"object","title":"not_found","required":["build_sheet_cache_id"],"properties":{"build_sheet_cache_id":{"$ref":"#/components/schemas/uuid.Uuid"}}}]},"tier1.DiagramName":{"description":"The name of a diagram, as dictated by the EPC.","type":"array","prefixItems":[{"$ref":"#/components/schemas/std.string.String"}]},"tier1.DiagramPartInput":{"description":"DiagramPartInput","type":"object","title":"tier1.DiagramPartInput","required":["part_id","part_name"],"properties":{"part_id":{"description":"OEM part UUID","$ref":"#/components/schemas/uuid.Uuid"},"part_name":{"description":"OEM part name","$ref":"#/components/schemas/std.string.String"},"part_note":{"description":"Optional OEM disambiguation note for this part (e.g. 'Left side', 'Without sunroof'). Used by the LLM to distinguish parts sharing the same name.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.DiagramPartOutput":{"description":"Part within a diagram with UUID mapping.","type":"object","title":"tier1.DiagramPartOutput","required":["part_id","part_name"],"properties":{"part_id":{"$ref":"#/components/schemas/uuid.Uuid"},"part_name":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DiagramV3":{"type":"object","title":"tier1.DiagramV3","required":["build_sheet_cache_id","code","id","name"],"properties":{"assembly_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}},"build_sheet_cache_id":{"$ref":"#/components/schemas/uuid.Uuid"},"category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"code":{"$ref":"#/components/schemas/tier1.DiagramCode"},"extracted_info":{"description":"It contains additional information for diagram filtering, such as page name, page number and fitment notes.","type":"array","items":{"$ref":"#/components/schemas/tier1.OemDiagramProperty"}},"id":{"$ref":"#/components/schemas/uuid.Uuid"},"name":{"$ref":"#/components/schemas/tier1.DiagramName"}}},"tier1.DiagramVariantIdentificationRequest":{"description":"DiagramVariantIdentificationRequest","type":"object","title":"tier1.DiagramVariantIdentificationRequest","required":["diagrams","make","vehicle_vin"],"properties":{"diagrams":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramDv"}},"make":{"$ref":"#/components/schemas/std.string.String"},"vehicle_vin":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DiagramVariantIdentificationResponse":{"description":"DiagramVariantIdentificationResponse","type":"object","title":"tier1.DiagramVariantIdentificationResponse","required":["prediction_id","variant_groups"],"properties":{"prediction_id":{"description":"Unique identifier for the prediction","$ref":"#/components/schemas/uuid.Uuid"},"variant_groups":{"description":"Inner list contains diagrams that are variants of each other","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}}},"tier1.DiagramWithParts":{"description":"Diagram with its damaged parts (UUID-based output).","type":"object","title":"tier1.DiagramWithParts","required":["diagram_id","diagram_name"],"properties":{"damaged_parts":{"description":"Parts detected as damaged in this diagram (can be empty)","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramPartOutput"}},"diagram_id":{"$ref":"#/components/schemas/uuid.Uuid"},"diagram_name":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.DiscoveryMetadata":{"description":"Provenance / sampling metadata describing how the amalgamation was produced.","type":"object","title":"tier1.DiscoveryMetadata","required":["resolved_brand","resolved_provider","sampled_vins","siblings_in_pool","total_diagram_instances","unique_diagrams","vehicles"],"properties":{"resolved_brand":{"description":"The brand inferred for the query VIN.","$ref":"#/components/schemas/std.string.String"},"resolved_provider":{"description":"The upstream provider the siblings were drawn from.","$ref":"#/components/schemas/std.string.String"},"sampled_vins":{"description":"The prepared sibling VINs amalgamated into this response, in sample order\n(closest production proximity first). Discovery is always sibling-derived:\na query VIN with its own prepared data is rejected up front.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"siblings_in_pool":{"description":"Candidate siblings considered from the index pool before cache filtering.","$ref":"#/components/schemas/usize"},"total_diagram_instances":{"description":"Total diagram instances across all sampled VINs before dedup.","$ref":"#/components/schemas/usize"},"unique_diagrams":{"description":"Distinct diagrams in the response after cross-VIN dedup.","$ref":"#/components/schemas/usize"},"vehicles":{"description":"Vehicle detail for the sampled siblings — one entry per `sampled_vins`\nentry, in the same order, so the two index together.\n\nNever partial and never empty: index members are validated at build time\nto have both prepared assembly data and a usable vehicles-cache entry, so\na sibling without detail means that invariant has broken and the request\nfails rather than returning an amalgamation of unnamed vehicles.","type":"array","items":{"$ref":"#/components/schemas/tier1.VehicleVariant"}}}},"tier1.E2eCacheInvalidateRequest":{"description":"A request to invalidate cached vehicle and assembly responses for a given chassis number.\nWhen `provider` is specified, only cache entries for that specific provider are deleted\n(preventing cross-provider cache interference when tests run in parallel).\nWhen `provider` is `None`, all entries for the chassis number are deleted.","type":"object","title":"tier1.E2eCacheInvalidateRequest","required":["chassis_number"],"properties":{"chassis_number":{"$ref":"#/components/schemas/std.string.String"},"provider":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.EpcHandlerError":{"oneOf":[{"description":"You have failed to provide a valid authentication token.","type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden","description":"The caller lacks permission to access this resource."}]},"tier1.EpcRefresh":{"oneOf":[{"const":"cached","description":"Use all caches. Normal traffic."},{"description":"Clear the E2E bundle (result cache + prepared output) and re-run\naggregation + processing over the *cached* provider response. Offline\nre-queries the DB (fresh); online does NOT re-hit the provider API.\n\n`dev_schema` is the dev-env number N pinning `epcviews_dev{N}` to\nreprocess against instead of the live routed schema (unified-offline\nonly; every other adapter ignores it). `None` reprocesses against the\nlive schema. `as_of` is the freshness target (see the type docs).","type":"object","title":"reprocess","required":["reprocess"],"properties":{"reprocess":{"description":"Clear the E2E bundle (result cache + prepared output) and re-run\naggregation + processing over the *cached* provider response. Offline\nre-queries the DB (fresh); online does NOT re-hit the provider API.\n\n`dev_schema` is the dev-env number N pinning `epcviews_dev{N}` to\nreprocess against instead of the live routed schema (unified-offline\nonly; every other adapter ignores it). `None` reprocesses against the\nlive schema. `as_of` is the freshness target (see the type docs).","type":"object","title":"reprocess","required":["as_of"],"properties":{"as_of":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"},"dev_schema":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u8"}]}}}}},{"description":"Everything `Reprocess` does, plus clear the raw provider cache. Online\nre-hits the live provider API (cost/rate-limit). For offline (no raw\ncache) this is identical to `Reprocess`. `as_of` is the freshness target.","type":"object","title":"refetch","required":["refetch"],"properties":{"refetch":{"description":"Everything `Reprocess` does, plus clear the raw provider cache. Online\nre-hits the live provider API (cost/rate-limit). For offline (no raw\ncache) this is identical to `Reprocess`. `as_of` is the freshness target.","type":"object","title":"refetch","required":["as_of"],"properties":{"as_of":{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}}}}}]},"tier1.EventKind":{"oneOf":[{"const":"assembly_search_completed","description":"An assembly search completed (reached a terminal state) for a vehicle."}]},"tier1.ExecutionMetadata":{"description":"ExecutionMetadata","type":"object","title":"tier1.ExecutionMetadata","properties":{"duration_seconds":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/f64"}]},"tokens":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.StepTokenUsage"}]}}},"tier1.ExperimentalSearchError":{"oneOf":[{"description":"The request could not be authenticated.","type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden","description":"The caller is not permitted to use this endpoint."},{"const":"frame_number_not_supported","description":"The chassis number is a frame number, not a VIN. Discovery clusters are\nkeyed by VIN, so frame numbers can never resolve to one."},{"const":"out_of_scope","description":"This VIN's make / descriptor cluster is outside the demo scope — no\nentry exists in the embedded index."},{"const":"no_siblings","description":"No prepared sibling vehicles were found for this VIN's cluster."},{"const":"insufficient_data","description":"Too few prepared sibling vehicles to produce a meaningful amalgamation."}]},"tier1.ExperimentalSearchRequest":{"description":"Discovery-mode search request: a bare VIN plus optional response-shaping\nknobs. The provider, brand and sibling set are resolved internally from the\nembedded index — the caller only supplies the VIN.","type":"object","title":"tier1.ExperimentalSearchRequest","required":["chassis_number"],"properties":{"chassis_number":{"description":"Vehicle identifier to run discovery for: a 17-character VIN or a frame\nnumber. Malformed values are rejected as invalid input, and frame numbers\nare rejected with [`ExperimentalSearchError::FrameNumberNotSupported`]\nsince discovery only clusters VINs.","$ref":"#/components/schemas/std.string.String"},"max_siblings":{"description":"Maximum number of prepared sibling VINs to fetch and amalgamate, ranked by\nproduction proximity (closest serial numbers first). Defaults to 5 and is\ncapped at 30; fewer are returned when the cluster holds less prepared data.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/usize"}]},"mpn_type":{"description":"Manufacturer-part-number representation. Defaults to `obfuscated`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.AssembliesSearchMpnType"}]}}},"tier1.ExperimentalSearchResponse":{"description":"Result of an experimental discovery search with per-diagram provenance and\nsampling metadata.","type":"object","title":"tier1.ExperimentalSearchResponse","required":["exact_match_exists","gapc_brand_id","metadata"],"properties":{"assemblies":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.AssemblyV4"}},"assembly_sources":{"description":"Which sampled siblings contributed each assembly, as indices into\n`metadata.sampled_vins`. Recorded before cross-VIN dedup, so a part several\nsiblings share lists all of them, not just the nearest one that survived.","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/u16"}}},"diagram_sources":{"description":"Which sampled siblings carried each diagram, as indices into\n`metadata.sampled_vins`. The list's length is how many carried it; the\ndenominator is `metadata.sampled_vins.len()`.","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/u16"}}},"diagrams":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.DiagramV3"}},"exact_match_exists":{"description":"The query VIN already has its own prepared assembly data (or is itself a\npool member, which implies the same). These results are still\nsibling-inferred, so prefer `assemblies.search` when this is true.","$ref":"#/components/schemas/bool"},"gapc_brand_id":{"description":"The brand SUID associated with all part numbers in this response.","$ref":"#/components/schemas/std.string.String"},"metadata":{"description":"Sampling / dedup provenance for this amalgamation.","$ref":"#/components/schemas/tier1.DiscoveryMetadata"},"root_nodes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uuid.Uuid"}}}},"tier1.ExtractedPart":{"description":"ExtractedPart","type":"object","title":"tier1.ExtractedPart","required":["confidence","part_name"],"properties":{"confidence":{"$ref":"#/components/schemas/f64"},"part_name":{"$ref":"#/components/schemas/std.string.String"},"part_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_number":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]}}},"tier1.GenericPredictionRequestVisionAnnotationBulkInputAnnotatedUnionVertexVisionAnnotationConfigStaticVisionAnnotationConfigRealtimeVisionAnnotationConfigBackgroundVisionAnnotationConfigRealtimeSyncVisionAnnotationConfigSymbolTextVisionAnnotationConfigRealtimeSupplierVisionAnnotationConfigLineBoxObbVisionAnnotationConfigPncocrVisionAnnotationConfigPncVisionAnnotationConfigStyleTransferPostProcessVisionAnnotationConfigStyleTransferLineBoxVisionAnnotationConfigFieldInfoAnnotationNoneTypeRequiredTrueDiscriminatorStrategy":{"description":"GenericPredictionRequestVisionAnnotationBulkInputAnnotatedUnionVertexVisionAnnotationConfigStaticVisionAnnotationConfigRealtimeVisionAnnotationConfigBackgroundVisionAnnotationConfigRealtimeSyncVisionAnnotationConfigSymbolTextVisionAnnotationConfigRealtimeSupplierVisionAnnotationConfigLineBoxObbVisionAnnotationConfigPncocrVisionAnnotationConfigPncVisionAnnotationConfigStyleTransferPostProcessVisionAnnotationConfigStyleTransferLineBoxVisionAnnotationConfigFieldInfoAnnotationNoneTypeRequiredTrueDiscriminatorStrategy","type":"object","title":"tier1.GenericPredictionRequestVisionAnnotationBulkInputAnnotatedUnionVertexVisionAnnotationConfigStaticVisionAnnotationConfigRealtimeVisionAnnotationConfigBackgroundVisionAnnotationConfigRealtimeSyncVisionAnnotationConfigSymbolTextVisionAnnotationConfigRealtimeSupplierVisionAnnotationConfigLineBoxObbVisionAnnotationConfigPncocrVisionAnnotationConfigPncVisionAnnotationConfigStyleTransferPostProcessVisionAnnotationConfigStyleTransferLineBoxVisionAnnotationConfigFieldInfoAnnotationNoneTypeRequiredTrueDiscriminatorStrategy","required":["data","metadata"],"properties":{"config":{"description":"Optional configuration by UUID, or a new config object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Config"}]},"data":{"$ref":"#/components/schemas/tier1.VisionAnnotationBulkInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.GhcaClassificationSearchRequest":{"description":"Request to search the GHCA tree by classification relationships.\n\nThis allows traversing the tree following \"is-a-part-of\" relationships, optionally\nstarting from a specific root node and descending a specified number of layers.","type":"object","title":"tier1.GhcaClassificationSearchRequest","properties":{"exclude_outdated":{"description":"Exclude nodes marked as `hca_outdated = true` from the result.","$ref":"#/components/schemas/bool"},"languages":{"description":"The languages to return the tree in. The default is `en`.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"max_depth":{"description":"The number of layers to build the tree for. Must be less than or equal\nto 10. There is a hard maximum number of nodes which can be configured\nvia environment variable.\n\nThe default number of layers is 3.","$ref":"#/components/schemas/u8"},"skip_empty_roots":{"description":"Skip root nodes that have no children.","$ref":"#/components/schemas/bool"},"tree_roots_ghca_id":{"description":"The node to start building the tree from. If this is empty, the roots of\nthe tree will be used.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.GhcaClassificationSearchResponse":{"description":"Response containing GHCA tree nodes found via classification search.","type":"object","title":"tier1.GhcaClassificationSearchResponse","required":["nodes"],"properties":{"nodes":{"description":"The tree nodes matching the search criteria, with all relationships resolved.","type":"array","items":{"$ref":"#/components/schemas/tier1.GhcaClassificationTreeNode"}}}},"tier1.GhcaClassificationSnapshot":{"description":"Every classification node, without `representation` or the Notion editing fields.","type":"object","title":"tier1.GhcaClassificationSnapshot","required":["nodes","replacements"],"properties":{"nodes":{"description":"Sorted by id.","type":"array","items":{"$ref":"#/components/schemas/tier1.GhcaClassificationTreeNode"}},"replacements":{"description":"Deprecated ids and the nodes that replaced them, as `ghca.classification.search`\nresolves a deprecated root.","type":"array","items":{"$ref":"#/components/schemas/tier1.GhcaReplacement"}}}},"tier1.GhcaClassificationSnapshotRequest":{"description":"Request for the whole classification tree in one language.\n\nThe tree is the same for every caller, so a client can keep the copy it has and send\nits version back; the response then carries no nodes unless the tree changed.","type":"object","title":"tier1.GhcaClassificationSnapshotRequest","properties":{"known_version":{"description":"The `version` of the snapshot the client already holds, if any.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"language":{"description":"The language to return names and aliases in. The default is `en`.","$ref":"#/components/schemas/std.string.String"}}},"tier1.GhcaClassificationSnapshotResponse":{"description":"The current classification tree version, and the tree itself unless the client has it.","type":"object","title":"tier1.GhcaClassificationSnapshotResponse","required":["version"],"properties":{"snapshot":{"description":"Absent when `known_version` is already current.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.GhcaClassificationSnapshot"}]},"version":{"description":"Changes whenever the tree's content does.","$ref":"#/components/schemas/std.string.String"}}},"tier1.GhcaClassificationTreeNode":{"description":"A node in the GHCA tree for classification search, representing a single human-centric assembly.\n\nThis structure contains all metadata and relationships for an assembly,\nincluding localized names, relationships to other assemblies, and visual\nrepresentations. Used for classification-based tree search where each node has at most one parent.","type":"object","title":"tier1.GhcaClassificationTreeNode","required":["gapc_part_type_id","gapc_position_id","id","order"],"properties":{"aliases":{"description":"Alternate terminology for this HCA - can be used to enrich search or\nother matching functionality. Depending on the type of alias, there is\nno guarantee that the alias will be unique for this `hca_world_tree_id`.","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"children":{"description":"The children of this node.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"created_by":{"description":"The Notion user name who created this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"decision_notes":{"description":"Notes to consider before saving HCA node","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_name_code":{"description":"The display name shorthand code from Notion.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gapc_part_type_id":{"description":"The part type this assembly belongs to.","$ref":"#/components/schemas/std.string.String"},"gapc_position_id":{"description":"The position/location classification of this assembly.","$ref":"#/components/schemas/std.string.String"},"hca_outdated":{"description":"Whether this HCA is considered outdated.","$ref":"#/components/schemas/bool"},"id":{"description":"Unique identifier for this assembly.","$ref":"#/components/schemas/std.string.String"},"is_base_part":{"description":"Whether or not this is a base part.","$ref":"#/components/schemas/bool"},"is_default_hca":{"description":"Whether this HCA is the default choice among similar HCAs.","$ref":"#/components/schemas/bool"},"is_temp_hca":{"description":"Whether this HCA is a temporary placeholder.","$ref":"#/components/schemas/bool"},"last_edited_by":{"description":"The Notion user name who last edited this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"mirrors_id":{"description":"The [`GapcHumanCentricAssemblySuid`] of the Assembly that this assembly mirrors.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"names":{"description":"The localised display names of the assembly or Layer.\nEach term is unique to this `hca_world_tree_id`.\nNormally concatenation of the part type and position.\nThis is a display name that is easier for the user to read","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"order":{"description":"The ordering number for this gapc human centric assembly.","$ref":"#/components/schemas/i32"},"parent":{"description":"The parent of this node, if it exists.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"raw_names":{"description":"The localised names of the assembly or Layer.\nEach term is unique to this `hca_world_tree_id`.\nThis is the canonical name of the part.","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"representation":{"description":"A description which can be displayed in the UI to better describe this\nnode to the end user.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.HumanCentricAssemblyRepresentation"}]},"revise_part_type":{"description":"Whether this HCA needs to revise the part type.","$ref":"#/components/schemas/bool"}}},"tier1.GhcaRefreshRequest":{"description":"Request to manually refresh the GHCA tree.\n\nThis endpoint forces an immediate reload of the tree from the database,\nbypassing the normal automatic refresh interval.","type":"object","title":"tier1.GhcaRefreshRequest","properties":{}},"tier1.GhcaRefreshResponse":{"description":"Response from the tree refresh operation.\n\nEmpty response indicating successful refresh. If the refresh fails,\nan error will be returned instead.","type":"object","title":"tier1.GhcaRefreshResponse","properties":{}},"tier1.GhcaReplacement":{"description":"A deprecated GHCA id and the live nodes that replaced it.","type":"object","title":"tier1.GhcaReplacement","required":["id","replaced_by"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"replaced_by":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.GhcaSearchError":{"oneOf":[{"description":"The request could not be authenticated. Check your API credentials.","type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden","description":"You do not have permission to access this resource."},{"const":"too_many_nodes","description":"The requested operation would return too many nodes.\n\nReduce the depth or scope of your query to return fewer results."},{"description":"Invalid World Tree ID provided to API.","type":"object","title":"invalid_world_tree_id","required":["invalid_world_tree_id"],"properties":{"invalid_world_tree_id":{"$ref":"#/components/schemas/std.string.String"}}}]},"tier1.GhcaSpatialSearchRequest":{"description":"Request to search the GHCA tree by spatial relationships.\n\nThis allows traversing the tree following \"is-part-of\" relationships,\nshowing how assemblies are spatially composed. Only base parts are included\nin the results.","type":"object","title":"tier1.GhcaSpatialSearchRequest","properties":{"include_parents":{"description":"Whether to include parent relationships in the results.","$ref":"#/components/schemas/bool"},"languages":{"description":"The languages to return the tree in. The default is `en`.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"max_depth":{"description":"The number of layers to build the tree for. Must be less than or equal\nto 10. There is a hard maximum number of nodes which can be configured\nvia environment variable.\n\nThe default number of layers is 3.","$ref":"#/components/schemas/u8"},"skip_empty_roots":{"description":"Skip root nodes that have no children.","$ref":"#/components/schemas/bool"},"tree_roots_ghca_id":{"description":"The node to start building the tree from. If this is empty, the roots of\nthe tree will be used.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.GhcaSpatialSearchResponse":{"description":"Response containing GHCA tree nodes found via spatial search.","type":"object","title":"tier1.GhcaSpatialSearchResponse","required":["nodes"],"properties":{"nodes":{"description":"The tree nodes matching the search criteria, with all relationships resolved.\nOnly base parts are included in the results.","type":"array","items":{"$ref":"#/components/schemas/tier1.GhcaTreeNode"}}}},"tier1.GhcaTreeNode":{"description":"A node in the GHCA tree for spatial search, representing a single human-centric assembly.\n\nThis structure contains all metadata and relationships for an assembly,\nincluding localized names, relationships to other assemblies, and visual\nrepresentations. Used for spatial-based tree search where nodes can have multiple parents.","type":"object","title":"tier1.GhcaTreeNode","required":["gapc_part_type_id","gapc_position_id","id","order"],"properties":{"aliases":{"description":"Alternate terminology for this HCA - can be used to enrich search or\nother matching functionality. Depending on the type of alias, there is\nno guarantee that the alias will be unique for this `hca_world_tree_id`.","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"children":{"description":"The children of this node.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"created_by":{"description":"The Notion user name who created this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"decision_notes":{"description":"Notes on how a decision about this assembly was made.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"display_name_code":{"description":"The display name shorthand code from Notion.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gapc_part_type_id":{"description":"The part type this assembly belongs to.","$ref":"#/components/schemas/std.string.String"},"gapc_position_id":{"description":"The position/location classification of this assembly.","$ref":"#/components/schemas/std.string.String"},"hca_outdated":{"description":"Whether this HCA is considered outdated.","$ref":"#/components/schemas/bool"},"id":{"description":"Unique identifier for this assembly.","$ref":"#/components/schemas/std.string.String"},"is_base_part":{"description":"Whether or not this is a base part.","$ref":"#/components/schemas/bool"},"is_default_hca":{"description":"Whether this HCA is the default choice among similar HCAs.","$ref":"#/components/schemas/bool"},"is_temp_hca":{"description":"Whether this HCA is a temporary placeholder.","$ref":"#/components/schemas/bool"},"last_edited_by":{"description":"The Notion user name who last edited this assembly.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"mirrors_id":{"description":"The [`GapcHumanCentricAssemblySuid`] of the Assembly that this assembly mirrors.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"names":{"description":"The localised display names of the assembly or Layer.\nEach term is unique to this `hca_world_tree_id`.\nNormally concatenation of the part type and position.\nThis is a display name that is easier for the user to read","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"order":{"description":"The ordering number for this gapc human centric assembly.","$ref":"#/components/schemas/i32"},"parents":{"description":"The parents of this node.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"raw_names":{"description":"The localised names of the assembly or Layer.\nEach term is unique to this `hca_world_tree_id`.\nThis is the canonical name of the part.","type":"array","items":{"$ref":"#/components/schemas/LanguageString"}},"representation":{"description":"A description which can be displayed in the UI to better describe this\nnode to the end user.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.HumanCentricAssemblyRepresentation"}]},"revise_part_type":{"description":"Whether this HCA needs to revise the part type.","$ref":"#/components/schemas/bool"}}},"tier1.HotspotDataNullable":{"description":"HotspotDataNullable","type":"object","title":"tier1.HotspotDataNullable","required":["x1","x2","y1","y2"],"properties":{"x1":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"x2":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"y1":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]},"y2":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u64"}]}}},"tier1.HumanCentricAssemblyDescription":{"type":"object","title":"tier1.HumanCentricAssemblyDescription","required":["function_purpose","typical_material","typical_positioning","typical_shape","usage_notes"],"properties":{"function_purpose":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"typical_material":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"typical_positioning":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"typical_shape":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"usage_notes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.HumanCentricAssemblyRepresentation":{"type":"object","title":"tier1.HumanCentricAssemblyRepresentation","required":["description","examples"],"properties":{"description":{"$ref":"#/components/schemas/tier1.HumanCentricAssemblyDescription"},"examples":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.HumanCentricAssemblyRepresentationExample"}}}},"tier1.HumanCentricAssemblyRepresentationExample":{"type":"object","title":"tier1.HumanCentricAssemblyRepresentationExample","required":["image_url"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"image_url":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.ImageItem":{"description":"ImageItem","type":"object","title":"tier1.ImageItem","required":["uri"],"properties":{"uri":{"description":"Remote image URI","$ref":"#/components/schemas/std.string.String"}}},"tier1.ImageMimeType":{"oneOf":[{"const":"image/jpeg"},{"const":"image/png"},{"const":"image/webp"}]},"tier1.ImageRelevanceAnalysisConfig":{"description":"ImageRelevanceAnalysisConfig","type":"object","title":"tier1.ImageRelevanceAnalysisConfig","properties":{"model":{"description":"GenAI model. Must support vision.","$ref":"#/components/schemas/std.string.String"},"system_prompt":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.ImageRelevanceResult":{"description":"ImageRelevanceResult","type":"object","title":"tier1.ImageRelevanceResult","required":["collision_context","is_collision_relevant","relevance_score","uri"],"properties":{"collision_context":{"description":"Concise context for the image: for collision-relevant images, a short damage summary; for non-relevant images, a short reason (e.g. 'No collision damage visible', 'Interior photo', or 'Document image').","$ref":"#/components/schemas/std.string.String"},"is_collision_relevant":{"$ref":"#/components/schemas/bool"},"relevance_score":{"description":"0-100: how informative this image is for damage assessment","$ref":"#/components/schemas/i64"},"uri":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.JobContextSelectionConfigNullable":{"description":"JobContextSelectionConfigNullable","type":"object","title":"tier1.JobContextSelectionConfigNullable","properties":{"context_selection":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.CollisionContextSelectionConfig"}]},"image_relevance":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.ImageRelevanceAnalysisConfig"}]},"model":{"description":"Override model for all sub-steps","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.JobContextSelectionInput":{"description":"JobContextSelectionInput","type":"object","title":"tier1.JobContextSelectionInput","required":["images"],"properties":{"images":{"description":"Input vehicle images to score and select from","type":"array","items":{"$ref":"#/components/schemas/tier1.ImageItem"}},"max_images":{"description":"Maximum number of images to select for downstream analysis","$ref":"#/components/schemas/u64"}}},"tier1.JobContextSelectionOutput":{"description":"JobContextSelectionOutput","type":"object","title":"tier1.JobContextSelectionOutput","required":["selected"],"properties":{"context_selection_skipped":{"description":"True if context selection LLM was skipped because collision-relevant count was within max_images limit","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"non_selected":{"description":"Images not selected (not collision-relevant or excluded by step 1b)","type":"array","items":{"$ref":"#/components/schemas/tier1.ImageRelevanceResult"}},"selected":{"description":"Final selected images for downstream analysis (step 2 input)","type":"array","items":{"$ref":"#/components/schemas/tier1.ImageRelevanceResult"}}}},"tier1.JobContextSelectionRequest":{"description":"JobContextSelectionRequest","type":"object","title":"tier1.JobContextSelectionRequest","required":["data"],"properties":{"config":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.JobContextSelectionConfigNullable"}]},"data":{"$ref":"#/components/schemas/tier1.JobContextSelectionInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.JobContextSelectionResponse":{"description":"JobContextSelectionResponse","type":"object","title":"tier1.JobContextSelectionResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.JobContextSelectionOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.JobContextToDiagramPartInput":{"description":"JobContextToDiagramPartInput","type":"object","title":"tier1.JobContextToDiagramPartInput","required":["diagrams"],"properties":{"diagrams":{"description":"Dictionary of diagram id to diagram metadata and part map","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.MlServerApiV1SchemaPredictionsJobContextToDiagramPartDiagramDefinition"}},"image_context_uri_dict":{"description":"Dictionary of image context id to remote image URI","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"text_context_dict":{"description":"Dictionary of text context id to text description","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.JobContextToDiagramPartOutput":{"description":"Final output: per-context relevant diagrams with their damaged parts.","type":"object","title":"tier1.JobContextToDiagramPartOutput","required":["context_based_diagrams"],"properties":{"context_based_diagrams":{"$ref":"#/components/schemas/tier1.ContextBasedDiagrams"}}},"tier1.JobContextToDiagramPartRequest":{"description":"JobContextToDiagramPartRequest","type":"object","title":"tier1.JobContextToDiagramPartRequest","required":["data"],"properties":{"config":{"description":"Optional configuration by UUID, or a new config object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Config"}]},"data":{"$ref":"#/components/schemas/tier1.JobContextToDiagramPartInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.JobContextToDiagramPartResponse":{"description":"JobContextToDiagramPartResponse","type":"object","title":"tier1.JobContextToDiagramPartResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.JobContextToDiagramPartOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.KeyFrame":{"description":"Key frame extracted from video analysis.","type":"object","title":"tier1.KeyFrame","required":["description","is_collision_relevant","reason","timestamp","view"],"properties":{"description":{"description":"What the frame shows (1-2 sentences)","$ref":"#/components/schemas/std.string.String"},"is_collision_relevant":{"description":"True if frame shows collision damage; false if context-only (VIN, undamaged areas, etc.)","$ref":"#/components/schemas/bool"},"reason":{"description":"Why this frame is worth capturing for the damage file (include missing view note if applicable)","$ref":"#/components/schemas/std.string.String"},"timestamp":{"description":"Timestamp in MM:SS or HH:MM:SS format (no milliseconds); use to seek video for frame extraction","$ref":"#/components/schemas/std.string.String"},"view":{"description":"wide = full vehicle/panel view establishing damage location; closeup = detailed view showing severity/parts","$ref":"#/components/schemas/tier1.View"}}},"tier1.Labelled":{"description":"A recognised value: its stable id and display name.","type":"object","title":"tier1.Labelled","required":["id","name"],"properties":{"id":{"description":"Stable; safe to persist. Valid values come from the vehicle-properties catalogue.","$ref":"#/components/schemas/std.string.String"},"name":{"description":"For display only; may change.","$ref":"#/components/schemas/std.string.String"}}},"tier1.MatchedRung":{"oneOf":[{"const":"registration_country"},{"const":"registration_group"},{"const":"org_country"},{"const":"org_group"},{"const":"general"}]},"tier1.MlDiagramCategoryPredictionConfigNullable":{"description":"MlDiagramCategoryPredictionConfigNullable","type":"object","title":"tier1.MlDiagramCategoryPredictionConfigNullable","properties":{"strategy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Strategy"}]},"use_overrides":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"tier1.MlServerApiV1SchemaPredictionsAiEstimationDiagramDefinition":{"description":"MlServerApiV1SchemaPredictionsAiEstimationDiagramDefinition","type":"object","title":"tier1.MlServerApiV1SchemaPredictionsAiEstimationDiagramDefinition","required":["name","parts"],"properties":{"name":{"description":"Diagram display name","$ref":"#/components/schemas/std.string.String"},"parts":{"description":"Parts available within this diagram","type":"array","items":{"$ref":"#/components/schemas/tier1.DiagramPartInput"}}}},"tier1.MlServerApiV1SchemaPredictionsJobContextToDiagramPartDiagramDefinition":{"description":"MlServerApiV1SchemaPredictionsJobContextToDiagramPartDiagramDefinition","type":"object","title":"tier1.MlServerApiV1SchemaPredictionsJobContextToDiagramPartDiagramDefinition","required":["name","parts"],"properties":{"name":{"description":"Diagram display name","$ref":"#/components/schemas/std.string.String"},"parts":{"description":"Dictionary of part_id to part name available within this diagram","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.MlThreshold":{"oneOf":[{"const":"repairer"},{"const":"service_and_mechanical"},{"$ref":"#/components/schemas/i64"}]},"tier1.ModelValue":{"type":"object","title":"tier1.ModelValue","required":["family","id","name"],"properties":{"family":{"description":"The root model this one refines (`bmw.x3` for the X3 xDrive20d); itself when it refines\nnothing. Filter on this.","$ref":"#/components/schemas/tier1.Labelled"},"id":{"$ref":"#/components/schemas/std.string.String"},"name":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.OemCatalogSearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"capacity_exceeded"},{"type":"object","title":"invalid_request","required":["invalid_request"],"properties":{"invalid_request":{"type":"object","title":"invalid_request","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/std.string.String"}}}}}]},"tier1.OemCatalogSearchRequest":{"type":"object","title":"tier1.OemCatalogSearchRequest","required":["make"],"properties":{"diagram_category":{"description":"Diagram category from the current build sheet.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_code":{"description":"Raw diagram code from the current build sheet, as normalization context only.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_name":{"description":"Raw diagram name.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"make":{"$ref":"#/components/schemas/std.string.String"},"mpn":{"description":"The part number as entered; the server normalizes it before matching.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"normalized_diagram_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"pnc":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"providers":{"description":"Restrict results to this set of providers. When absent, all providers are searched.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}]},"raw_properties":{"description":"Raw hotspot properties from the current build sheet.","oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}]}}},"tier1.OemCatalogSearchResponse":{"type":"object","title":"tier1.OemCatalogSearchResponse","required":["rows"],"properties":{"rows":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.OemCatalogSearchRow"}}}},"tier1.OemCatalogSearchRow":{"description":"One catalog part that matched the search, with the diagram it appears on.","type":"object","title":"tier1.OemCatalogSearchRow","required":["build_sheet_cache_id","chassis_number","diagram_code","diagram_title","make","model","provider"],"properties":{"build_sheet_cache_id":{"$ref":"#/components/schemas/uuid.Uuid"},"category":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"chassis_number":{"$ref":"#/components/schemas/std.string.String"},"diagram_attributes":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"diagram_code":{"$ref":"#/components/schemas/std.string.String"},"diagram_hotspots":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/serde_json.Value"}]},"diagram_part_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"diagram_title":{"description":"The diagram's title as the provider shows it.","$ref":"#/components/schemas/std.string.String"},"fitment_notes":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"make":{"$ref":"#/components/schemas/std.string.String"},"model":{"$ref":"#/components/schemas/std.string.String"},"normalized_diagram_name":{"description":"The diagram's normalized name, the identifier the search matches on. Not for display:\nuse `diagram_title`.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_number":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"provider":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i32"}]},"variant_index":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i16"}]},"year":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/i16"}]}}},"tier1.OemDiagramAssociation":{"description":"OEM diagram associated with a source image (high recall).","type":"object","title":"tier1.OemDiagramAssociation","required":["diagram_id","diagram_name"],"properties":{"confidence_score":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/f64"}]},"diagram_id":{"description":"OEM diagram UUID","$ref":"#/components/schemas/uuid.Uuid"},"diagram_name":{"description":"OEM diagram name","$ref":"#/components/schemas/std.string.String"}}},"tier1.OemDiagramGroup":{"description":"Source image with its associated OEM diagrams (high recall).","type":"object","title":"tier1.OemDiagramGroup","required":["image_uri"],"properties":{"associated_oem_diagrams":{"description":"OEM diagrams relevant to this image","type":"array","items":{"$ref":"#/components/schemas/tier1.OemDiagramAssociation"}},"damage_contexts":{"description":"Damage context descriptions visible in this image","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"image_uri":{"description":"Image URI","$ref":"#/components/schemas/std.string.String"}}},"tier1.OemDiagramHotSpotTransformation":{"type":"object","title":"tier1.OemDiagramHotSpotTransformation","required":["scale_x","scale_y"],"properties":{"scale_x":{"$ref":"#/components/schemas/f64"},"scale_y":{"$ref":"#/components/schemas/f64"}}},"tier1.OemDiagramProperty":{"oneOf":[{"type":"object","title":"page_name","required":["page_name"],"properties":{"page_name":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"page_number","required":["page_number"],"properties":{"page_number":{"$ref":"#/components/schemas/tier1.PageNum"}}},{"description":"All unspecified diagram properties are contained within a single string of options.","type":"object","title":"option","required":["option"],"properties":{"option":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}]},"tier1.OemHardwarePart":{"description":"Hardware part associated with a main OEM part.","type":"object","title":"tier1.OemHardwarePart","required":["confidence","diagram_id","diagram_name","part_id","part_name"],"properties":{"confidence":{"description":"high = direct mapping; low = inferred hardware linkage","$ref":"#/components/schemas/tier1.Confidence"},"diagram_id":{"description":"OEM diagram UUID","$ref":"#/components/schemas/uuid.Uuid"},"diagram_name":{"description":"OEM diagram name","$ref":"#/components/schemas/std.string.String"},"part_id":{"description":"OEM hardware part UUID","$ref":"#/components/schemas/uuid.Uuid"},"part_name":{"description":"OEM hardware part name","$ref":"#/components/schemas/std.string.String"},"part_note":{"description":"Optional note distinguishing this hardware part","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.OemMappingConfig":{"description":"OemMappingConfig","type":"object","title":"tier1.OemMappingConfig","properties":{"model":{"description":"GenAI model. Text-only.","$ref":"#/components/schemas/std.string.String"},"system_prompt":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.OemMappingConfigNullable":{"description":"OemMappingConfigNullable","type":"object","title":"tier1.OemMappingConfigNullable","properties":{"model":{"description":"GenAI model. Text-only.","$ref":"#/components/schemas/std.string.String"},"system_prompt":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.OemMappingInput":{"description":"OemMappingInput","type":"object","title":"tier1.OemMappingInput","required":["diagrams","raw_parts"],"properties":{"damage_contexts":{"description":"Damage contexts grouped by image URI","type":"array","items":{"$ref":"#/components/schemas/tier1.DamageContext"}},"diagrams":{"description":"Vehicle OEM diagrams with available part names","type":"object","additionalProperties":{"$ref":"#/components/schemas/tier1.MlServerApiV1SchemaPredictionsAiEstimationDiagramDefinition"}},"raw_parts":{"description":"Raw parts from step 2 (raw_part_name, replacement_reason)","type":"array","items":{"$ref":"#/components/schemas/tier1.RawPart"}},"vehicle_info":{"description":"Optional vehicle context (e.g. '2019 Toyota Camry 2.5L SE') for trim/variant-aware OEM matching","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.OemMappingOutput":{"description":"Simplified OEM mapping: high precision parts + high recall diagrams.","type":"object","title":"tier1.OemMappingOutput","properties":{"oem_diagrams":{"description":"Source images grouped with associated OEM diagrams (high recall)","type":"array","items":{"$ref":"#/components/schemas/tier1.OemDiagramGroup"}},"oem_parts":{"description":"Recommended parts grouped with associated OEM parts (high precision)","type":"array","items":{"$ref":"#/components/schemas/tier1.OemPartGroup"}}}},"tier1.OemMappingRequest":{"description":"OemMappingRequest","type":"object","title":"tier1.OemMappingRequest","required":["data"],"properties":{"config":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.OemMappingConfigNullable"}]},"data":{"$ref":"#/components/schemas/tier1.OemMappingInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.OemMappingResponse":{"description":"OemMappingResponse","type":"object","title":"tier1.OemMappingResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.OemMappingOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.OemPartAssociation":{"description":"OEM part associated with a recommended part (high precision).","type":"object","title":"tier1.OemPartAssociation","required":["confidence","diagram_id","diagram_name","part_id","part_name"],"properties":{"confidence":{"description":"high = direct visual evidence; low = inferred","$ref":"#/components/schemas/tier1.Confidence"},"diagram_id":{"description":"OEM diagram UUID","$ref":"#/components/schemas/uuid.Uuid"},"diagram_name":{"description":"OEM diagram name","$ref":"#/components/schemas/std.string.String"},"hardware_kit":{"description":"Hardware kit parts associated with this main OEM part","type":"array","items":{"$ref":"#/components/schemas/tier1.OemHardwarePart"}},"part_id":{"description":"OEM part UUID","$ref":"#/components/schemas/uuid.Uuid"},"part_name":{"description":"OEM part name","$ref":"#/components/schemas/std.string.String"},"part_note":{"description":"Optional note distinguishing this part from others sharing the same name (e.g. position, mounting point, trim variant)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.OemPartGroup":{"description":"Recommended part with its associated OEM parts (high precision).","type":"object","title":"tier1.OemPartGroup","required":["damage_reason","quantity","raw_part_name","replacement_reason"],"properties":{"associated_oem_parts":{"description":"OEM parts associated with this recommended part","type":"array","items":{"$ref":"#/components/schemas/tier1.OemPartAssociation"}},"confidence":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Confidence"}]},"damage_reason":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u64"},"raw_part_name":{"description":"Raw part name","$ref":"#/components/schemas/std.string.String"},"recommended_action":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.RecommendedAction"}]},"replacement_reason":{"$ref":"#/components/schemas/std.string.String"},"severity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Severity"}]},"source_image_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.OemVehicleProperty":{"oneOf":[{"type":"object","title":"aspiration","required":["aspiration"],"properties":{"aspiration":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"bed_length","required":["bed_length"],"properties":{"bed_length":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"bed_type","required":["bed_type"],"properties":{"bed_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"body_num_doors","required":["body_num_doors"],"properties":{"body_num_doors":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"body_type","required":["body_type"],"properties":{"body_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"brake_abs","required":["brake_abs"],"properties":{"brake_abs":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"brake_system","required":["brake_system"],"properties":{"brake_system":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"cylinder_head_type","required":["cylinder_head_type"],"properties":{"cylinder_head_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"drive_type","required":["drive_type"],"properties":{"drive_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"engine_designation","required":["engine_designation"],"properties":{"engine_designation":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"engine_mfr","required":["engine_mfr"],"properties":{"engine_mfr":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"engine_power_output","required":["engine_power_output"],"properties":{"engine_power_output":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"front_brake_type","required":["front_brake_type"],"properties":{"front_brake_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"front_spring_type","required":["front_spring_type"],"properties":{"front_spring_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"fuel_delivery_subtype","required":["fuel_delivery_subtype"],"properties":{"fuel_delivery_subtype":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"fuel_delivery_type","required":["fuel_delivery_type"],"properties":{"fuel_delivery_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"fuel_system_control_type","required":["fuel_system_control_type"],"properties":{"fuel_system_control_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"fuel_system_design","required":["fuel_system_design"],"properties":{"fuel_system_design":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"fuel_type","required":["fuel_type"],"properties":{"fuel_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"ignition_system_type","required":["ignition_system_type"],"properties":{"ignition_system_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"make","required":["make"],"properties":{"make":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"mfr_body_code","required":["mfr_body_code"],"properties":{"mfr_body_code":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"model","required":["model"],"properties":{"model":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"production_month_from","required":["production_month_from"],"properties":{"production_month_from":{"$ref":"#/components/schemas/u16"}}},{"type":"object","title":"production_month_to","required":["production_month_to"],"properties":{"production_month_to":{"$ref":"#/components/schemas/u16"}}},{"type":"object","title":"production_year_from","required":["production_year_from"],"properties":{"production_year_from":{"$ref":"#/components/schemas/u16"}}},{"type":"object","title":"production_year_to","required":["production_year_to"],"properties":{"production_year_to":{"$ref":"#/components/schemas/u16"}}},{"type":"object","title":"rear_brake_type","required":["rear_brake_type"],"properties":{"rear_brake_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"rear_spring_type","required":["rear_spring_type"],"properties":{"rear_spring_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"series","required":["series"],"properties":{"series":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"steering_side","required":["steering_side"],"properties":{"steering_side":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"steering_system","required":["steering_system"],"properties":{"steering_system":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"steering_type","required":["steering_type"],"properties":{"steering_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"submodel","required":["submodel"],"properties":{"submodel":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"transmission_control_type","required":["transmission_control_type"],"properties":{"transmission_control_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"transmission_elec_control","required":["transmission_elec_control"],"properties":{"transmission_elec_control":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"transmission_mfr","required":["transmission_mfr"],"properties":{"transmission_mfr":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"transmission_mfr_code","required":["transmission_mfr_code"],"properties":{"transmission_mfr_code":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"transmission_num_speeds","required":["transmission_num_speeds"],"properties":{"transmission_num_speeds":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"transmission_type","required":["transmission_type"],"properties":{"transmission_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"valves","required":["valves"],"properties":{"valves":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"wheel_base","required":["wheel_base"],"properties":{"wheel_base":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"market","required":["market"],"properties":{"market":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"production_year","required":["production_year"],"properties":{"production_year":{"$ref":"#/components/schemas/u16"}}},{"type":"object","title":"production_month","required":["production_month"],"properties":{"production_month":{"$ref":"#/components/schemas/u16"}}},{"type":"object","title":"engine","required":["engine"],"properties":{"engine":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"engine_capacity","required":["engine_capacity"],"properties":{"engine_capacity":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"engine_block","required":["engine_block"],"properties":{"engine_block":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"roof_type","required":["roof_type"],"properties":{"roof_type":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"grade","required":["grade"],"properties":{"grade":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"trim","required":["trim"],"properties":{"trim":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"num_seats","required":["num_seats"],"properties":{"num_seats":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"rear_wheel_configuration","required":["rear_wheel_configuration"],"properties":{"rear_wheel_configuration":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"model_code","required":["model_code"],"properties":{"model_code":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"vin_prefix","required":["vin_prefix"],"properties":{"vin_prefix":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"vin_range","required":["vin_range"],"properties":{"vin_range":{"description":"Fixed-size Array","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},{"type":"object","title":"engine_code_range","required":["engine_code_range"],"properties":{"engine_code_range":{"description":"Fixed-size Array","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},{"type":"object","title":"model_code_range","required":["model_code_range"],"properties":{"model_code_range":{"description":"Fixed-size Array","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},{"type":"object","title":"adas_equipment","required":["adas_equipment"],"properties":{"adas_equipment":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"option","required":["option"],"properties":{"option":{"$ref":"#/components/schemas/std.string.String"}}}]},"tier1.PageNum":{"type":"object","title":"tier1.PageNum","required":["current_page_num","total_pages"],"properties":{"current_page_num":{"$ref":"#/components/schemas/u16"},"total_pages":{"$ref":"#/components/schemas/u16"}}},"tier1.Part":{"description":"Part","type":"object","title":"tier1.Part","required":["diagram_url","hca_id","hotspot","normalized_mpn","part_code"],"properties":{"diagram_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hca_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"hotspot":{"$ref":"#/components/schemas/tier1.HotspotDataNullable"},"normalized_mpn":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"part_code":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.PartDv":{"description":"PartDv","type":"object","title":"tier1.PartDv","required":["description","normalized_mpn","pnc"],"properties":{"description":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"normalized_mpn":{"$ref":"#/components/schemas/std.string.String"},"pnc":{"description":"Part PNC, okay to assign None if MPN does not have a PNC","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.PartListExtractionAudioInput":{"description":"PartListExtractionAudioInput","type":"object","title":"tier1.PartListExtractionAudioInput","required":["mime_type","uris"],"properties":{"input_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.PartListExtractionAudioInputType"}]},"mime_type":{"description":"MIME type(s), e.g. audio/mpeg, audio/wav","type":"array","items":{"$ref":"#/components/schemas/tier1.AudioMimeType"}},"uris":{"description":"URI(s), e.g. https://bucket.s3.amazonaws.com/path/file.mp3?...","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.PartListExtractionAudioInputType":{"oneOf":[{"const":"audio"}]},"tier1.PartListExtractionImageInput":{"description":"PartListExtractionImageInput","type":"object","title":"tier1.PartListExtractionImageInput","required":["mime_type","uris"],"properties":{"input_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.PartListExtractionImageInputType"}]},"mime_type":{"description":"MIME type(s), e.g. image/jpeg, image/png","type":"array","items":{"$ref":"#/components/schemas/tier1.ImageMimeType"}},"uris":{"description":"URI(s), e.g. https://bucket.s3.amazonaws.com/path/file.png?...","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.PartListExtractionImageInputType":{"oneOf":[{"const":"image"}]},"tier1.PartListExtractionInput":{"oneOf":[{"$ref":"#/components/schemas/tier1.PartListExtractionAudioInput"},{"$ref":"#/components/schemas/tier1.PartListExtractionTextInput"},{"$ref":"#/components/schemas/tier1.PartListExtractionPdfInput"},{"$ref":"#/components/schemas/tier1.PartListExtractionImageInput"}]},"tier1.PartListExtractionOutput":{"description":"PartListExtractionOutput","type":"object","title":"tier1.PartListExtractionOutput","required":["parts"],"properties":{"parts":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.ExtractedPart"}}}},"tier1.PartListExtractionPdfInput":{"description":"PartListExtractionPdfInput","type":"object","title":"tier1.PartListExtractionPdfInput","required":["mime_type","uris"],"properties":{"input_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.PartListExtractionPdfInputType"}]},"mime_type":{"description":"MIME type(s), e.g. application/pdf","type":"array","items":{"$ref":"#/components/schemas/tier1.PdfMimeType"}},"uris":{"description":"URI(s), e.g. https://bucket.s3.amazonaws.com/path/file.pdf?...","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.PartListExtractionPdfInputType":{"oneOf":[{"const":"pdf"}]},"tier1.PartListExtractionRequest":{"description":"PartListExtractionRequest","type":"object","title":"tier1.PartListExtractionRequest","required":["data"],"properties":{"config":{"description":"Optional configuration by UUID, or a new config object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Config"}]},"data":{"$ref":"#/components/schemas/tier1.PartListExtractionInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.PartListExtractionResponse":{"description":"PartListExtractionResponse","type":"object","title":"tier1.PartListExtractionResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.PartListExtractionOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.PartListExtractionTextInput":{"description":"PartListExtractionTextInput","type":"object","title":"tier1.PartListExtractionTextInput","required":["mime_type","uris"],"properties":{"input_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.PartListExtractionTextInputType"}]},"mime_type":{"description":"MIME type(s), e.g. text/plain","type":"array","items":{"$ref":"#/components/schemas/tier1.TextMimeType"}},"uris":{"description":"URI(s) for text file input, e.g. https://bucket.s3.amazonaws.com/path/file.txt?...","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.PartListExtractionTextInputType":{"oneOf":[{"const":"text"}]},"tier1.PartNumberKind":{"oneOf":[{"const":"generic","description":"This is a generic part number with no specific categorisation."},{"const":"finis","description":"Finis numbers are used by Ford."},{"const":"catalogue","description":"Catalog part numbers are typically used by General Motors, or brands owned by them e.g. Vauxhall/Opel/Holden."}]},"tier1.PartRecommendation":{"description":"PartRecommendation","type":"object","title":"tier1.PartRecommendation","required":["confidence","part","source"],"properties":{"confidence":{"$ref":"#/components/schemas/f64"},"part":{"$ref":"#/components/schemas/tier1.Part"},"source":{"$ref":"#/components/schemas/tier1.Source"}}},"tier1.PdfMimeType":{"oneOf":[{"const":"application/pdf"}]},"tier1.Position":{"oneOf":[{"const":"left"},{"const":"right"},{"const":"both"}]},"tier1.PredictionType":{"oneOf":[{"const":"vertex"},{"const":"realtime"},{"const":"background"},{"const":"symbol_text"},{"const":"realtime_supplier"},{"const":"line_box_obb"},{"const":"realtime_sync"},{"const":"pnc_ocr"},{"const":"pnc"},{"const":"style_transfer_post_process"},{"const":"style_transfer_line_box"},{"const":"part_relationship"}]},"tier1.Priority":{"oneOf":[{"const":"foreground"},{"const":"background"}]},"tier1.Production":{"type":"object","title":"tier1.Production","properties":{"date":{"description":"When this vehicle was built, from the VIN when the provider has it.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.YearMonth"}]},"range":{"description":"The variant's catalogue production run. `date` falls inside it when both are present.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.ProductionRange"}]}}},"tier1.ProductionRange":{"type":"object","title":"tier1.ProductionRange","properties":{"from":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.YearMonth"}]},"to":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.YearMonth"}]}}},"tier1.ProviderSelection":{"oneOf":[{"const":"all"},{"type":"object","title":"only","required":["only"],"properties":{"only":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}}]},"tier1.ProviderStatus":{"type":"object","title":"tier1.ProviderStatus","required":["allowed","provider"],"properties":{"allowed":{"$ref":"#/components/schemas/bool"},"provider":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.Qualifier":{"oneOf":[{"type":"object","title":"exact_replacement","required":["kind"],"properties":{"kind":{"const":"exact_replacement"}}},{"type":"object","title":"alternate_finish","required":["kind"],"properties":{"kind":{"const":"alternate_finish"}}},{"type":"object","title":"usable","required":["kind"],"properties":{"kind":{"const":"usable"}}},{"type":"object","title":"supersedes","required":["kind"],"properties":{"kind":{"const":"supersedes"}}}]},"tier1.QueueEta":{"oneOf":[{"const":"not_available","description":"No estimate available — nothing left to wait for, queued below high\npriority, or the queue can't be measured for this vehicle."},{"description":"Estimated seconds until the next state change.","type":"object","title":"eta","required":["eta"],"properties":{"eta":{"$ref":"#/components/schemas/f64"}}},{"const":"very_long","description":"In the queue, but far enough out that no number would be honest — a very\ndeep queue, or a partition whose workers have stopped making progress."}]},"tier1.R2hConfigNullable":{"description":"R2hConfigNullable","type":"object","title":"tier1.R2hConfigNullable","properties":{"k_nearest":{"description":"Number of HCAs to return for each raw part","$ref":"#/components/schemas/i64"},"popularity_weight":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/f64"}]},"use_ibody_code_mapping":{"description":"Map ibody short code to full ibody name before generating embeddings","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"tier1.R2hInputPart":{"description":"R2hInputPart","type":"object","title":"tier1.R2hInputPart","required":["part_id","text"],"properties":{"part_id":{"description":"Unique identifier for the raw part","$ref":"#/components/schemas/uuid.Uuid"},"text":{"description":"Raw text description of the part","$ref":"#/components/schemas/std.string.String"}}},"tier1.R2hPredictionItem":{"description":"R2hPredictionItem","type":"object","title":"tier1.R2hPredictionItem","required":["hca_id","similarity_score"],"properties":{"hca_id":{"$ref":"#/components/schemas/std.string.String"},"similarity_score":{"$ref":"#/components/schemas/f64"}}},"tier1.R2hRequest":{"description":"R2hRequest","type":"object","title":"tier1.R2hRequest","required":["data"],"properties":{"config":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.R2hConfigNullable"}]},"data":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.R2hInputPart"}}}},"tier1.R2hResponse":{"description":"R2hResponse","type":"object","title":"tier1.R2hResponse","required":["parts"],"properties":{"parts":{"description":"Mapping of raw part IDs to their k_nearest predicted HCA items, will be ordered by similarity score","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.R2hPredictionItem"}}}}},"tier1.RawPart":{"description":"Raw part from step 2 for OEM mapping.","type":"object","title":"tier1.RawPart","required":["raw_part_name"],"properties":{"confidence":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Confidence"}]},"damage_reason":{"description":"Observed damage reason for this raw part","$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u64"},"raw_part_name":{"description":"Raw part name","$ref":"#/components/schemas/std.string.String"},"recommended_action":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.RecommendedAction"}]},"replacement_reason":{"description":"Reason for replacement; may be empty","$ref":"#/components/schemas/std.string.String"},"severity":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Severity"}]},"source_image_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.ReadinessIdentifier":{"oneOf":[{"$ref":"#/components/schemas/std.string.String"},{"$ref":"#/components/schemas/std.string.String"}]},"tier1.ReadinessStatusRequest":{"description":"A request to check readiness status for one or more vehicles.\n\nThe `identifiers` field accepts an array of strings. Each string is tried\nas an OEM vehicle ID first; if decoding fails it is treated as a plain\nchassis number. OEM vehicle IDs and chassis numbers may be freely mixed.","type":"object","title":"tier1.ReadinessStatusRequest","required":["identifiers"],"properties":{"identifiers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.ReadinessIdentifier"}}}},"tier1.ReadinessStatusResponse":{"type":"object","title":"tier1.ReadinessStatusResponse","required":["statuses"],"properties":{"statuses":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.VinStatus"}}}},"tier1.RecommendationInput":{"description":"RecommendationInput","type":"object","title":"tier1.RecommendationInput","required":["claim_number","vehicle_vin"],"properties":{"claim_number":{"$ref":"#/components/schemas/std.string.String"},"vehicle_vin":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.RecommendationOuptut":{"description":"RecommendationOuptut","type":"object","title":"tier1.RecommendationOuptut","required":["part_recommendations"],"properties":{"part_recommendations":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.PartRecommendation"}}}},"tier1.RecommendationRequest":{"description":"RecommendationRequest","type":"object","title":"tier1.RecommendationRequest","required":["data","metadata"],"properties":{"config":{"description":"Optional configuration by UUID, or a new config object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Config"}]},"data":{"$ref":"#/components/schemas/tier1.RecommendationInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.RecommendationResponse":{"description":"RecommendationResponse","type":"object","title":"tier1.RecommendationResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.RecommendationOuptut"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.RecommendedAction":{"oneOf":[{"const":"repair"},{"const":"replacement"}]},"tier1.RecommendedPart":{"description":"Output of step 2; input of step 3.","type":"object","title":"tier1.RecommendedPart","required":["confidence","damage_reason","quantity","raw_part_name","recommended_action","recommended_part_id","repairer_notes","replacement_reason","severity","source_image_ids"],"properties":{"confidence":{"description":"high = direct visual evidence; low = inferred from adjacency, text, or audio only","$ref":"#/components/schemas/tier1.Confidence"},"damage_reason":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u64"},"raw_part_name":{"$ref":"#/components/schemas/std.string.String"},"recommended_action":{"description":"Final action recommendation for this part","$ref":"#/components/schemas/tier1.RecommendedAction"},"recommended_part_id":{"$ref":"#/components/schemas/std.string.String"},"repairer_notes":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"replacement_reason":{"$ref":"#/components/schemas/std.string.String"},"severity":{"$ref":"#/components/schemas/tier1.Severity"},"source_image_ids":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.RequestSource":{"oneOf":[{"const":"preloader","description":"Vehicle preloader worker request"},{"const":"integrations_server","description":"Request from integrations-server"},{"const":"interpreter","description":"Request from the Interpreter service"},{"const":"parts_verification","description":"Request from the parts verification service"},{"const":"external_job_integration","description":"Request from external-job-integration service"},{"const":"dismantler_background_worker","description":"Request from donor vehicle indexing (dismantler background worker)"},{"const":"storefront","description":"Request from storefront-server"},{"const":"repair_jobs_feed","description":"Request from repair-jobs-feed-integration service"},{"const":"repairer","description":"Request from mfe-repair frontend"},{"const":"workshop","description":"Request from mfe-workshop frontend"},{"const":"pim","description":"Request from pim-web frontend"},{"const":"data_qa","description":"Request from dataqa-web frontend"},{"const":"dismantler","description":"Request from dismantler frontend"},{"const":"demo_cache_script","description":"Request from the public-demo-server VIN cache script (cache_demo_vins.py)"},{"const":"unknown","description":"Unknown or legacy request source, DO NOT USE."}]},"tier1.RerankingStrategy":{"oneOf":[{"const":"popularity"}]},"tier1.SearchConfig":{"description":"SearchConfig","type":"object","title":"tier1.SearchConfig","properties":{"convert_short_codes":{"description":"Whether to apply short code conversion before search","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"labelled_automatch_threshold":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/f64"}]},"labelled_similarity_threshold":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/f64"}]},"labelled_top_k":{"description":"Number of nearest labelled-text candidates to retrieve before filtering by labelled_similarity_threshold.","$ref":"#/components/schemas/i64"},"reranking_arguments":{"description":"Additional arguments for the reranking strategy","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}},"reranking_strategy":{"description":"Reranking strategy to apply on the retrieved items","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.RerankingStrategy"}]},"retrieved_k":{"description":"Number of items retrieved for reranking","$ref":"#/components/schemas/i64"},"returned_k":{"description":"Number of items returned to the user","$ref":"#/components/schemas/i64"}}},"tier1.SearchRequest":{"description":"SearchRequest","type":"object","title":"tier1.SearchRequest","required":["oem_vehicle_id","query","search_types"],"properties":{"config":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.SearchConfig"}]},"oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"},"query":{"$ref":"#/components/schemas/std.string.String"},"search_types":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.VehicleEmbeddingItemType"}}}},"tier1.SearchResponse":{"description":"SearchResponse","type":"object","title":"tier1.SearchResponse","required":["results"],"properties":{"results":{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.SearchResultItem"}}}}},"tier1.SearchResultItem":{"description":"SearchResultItem","type":"object","title":"tier1.SearchResultItem","required":["item_id","metadata","score"],"properties":{"item_id":{"$ref":"#/components/schemas/uuid.Uuid"},"metadata":{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}},"score":{"$ref":"#/components/schemas/f64"}}},"tier1.Severity":{"oneOf":[{"const":"minor"},{"const":"moderate"},{"const":"severe"}]},"tier1.Source":{"oneOf":[{"const":"override"},{"const":"static"}]},"tier1.StaticDiagramCategoryPredictionConfigNullable":{"description":"StaticDiagramCategoryPredictionConfigNullable","type":"object","title":"tier1.StaticDiagramCategoryPredictionConfigNullable","properties":{"strategy":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Strategy"}]},"use_overrides":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]}}},"tier1.Status":{"oneOf":[{"const":"completed"},{"const":"queued"}]},"tier1.StepTokenUsage":{"description":"StepTokenUsage","type":"object","title":"tier1.StepTokenUsage","required":["input_tokens","model_used","output_tokens","total_tokens"],"properties":{"input_tokens":{"$ref":"#/components/schemas/i64"},"model_used":{"$ref":"#/components/schemas/std.string.String"},"output_tokens":{"$ref":"#/components/schemas/i64"},"total_tokens":{"$ref":"#/components/schemas/i64"}}},"tier1.Strategy":{"oneOf":[{"const":"background"}]},"tier1.TextMimeType":{"oneOf":[{"const":"text/plain"}]},"tier1.TypedVehicleProperties":{"type":"object","title":"tier1.TypedVehicleProperties","required":["body_num_doors","body_type","make","market","steering_side"],"properties":{"body_num_doors":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"known<tier1.Labelled>","required":["known"],"properties":{"known":{"$ref":"#/components/schemas/tier1.Labelled"}}},{"type":"object","title":"raw<tier1.Labelled>","required":["raw"],"properties":{"raw":{"$ref":"#/components/schemas/std.string.String"}}}]}},"body_type":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"known<tier1.Labelled>","required":["known"],"properties":{"known":{"$ref":"#/components/schemas/tier1.Labelled"}}},{"type":"object","title":"raw<tier1.Labelled>","required":["raw"],"properties":{"raw":{"$ref":"#/components/schemas/std.string.String"}}}]}},"make":{"description":"Always known: it comes from the variant id, not a provider string.","$ref":"#/components/schemas/tier1.Labelled"},"market":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"known<tier1.Labelled>","required":["known"],"properties":{"known":{"$ref":"#/components/schemas/tier1.Labelled"}}},{"type":"object","title":"raw<tier1.Labelled>","required":["raw"],"properties":{"raw":{"$ref":"#/components/schemas/std.string.String"}}}]}},"model":{"oneOf":[{"description":"Null","type":"null"},{"oneOf":[{"type":"object","title":"known<tier1.ModelValue>","required":["known"],"properties":{"known":{"$ref":"#/components/schemas/tier1.ModelValue"}}},{"type":"object","title":"raw<tier1.ModelValue>","required":["raw"],"properties":{"raw":{"$ref":"#/components/schemas/std.string.String"}}}]}]},"production":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Production"}]},"steering_side":{"description":"Expandable array type","type":"array","items":{"oneOf":[{"type":"object","title":"known<tier1.Labelled>","required":["known"],"properties":{"known":{"$ref":"#/components/schemas/tier1.Labelled"}}},{"type":"object","title":"raw<tier1.Labelled>","required":["raw"],"properties":{"raw":{"$ref":"#/components/schemas/std.string.String"}}}]}}}},"tier1.VariantDisambiguationBrand":{"description":"What one brand's rule decided.","type":"object","title":"tier1.VariantDisambiguationBrand","required":["brand","kept","total"],"properties":{"brand":{"$ref":"#/components/schemas/std.string.String"},"kept":{"description":"How many variants survived, out of `total`. Equal values mean the rule ran and changed\nnothing — which is a different thing from the rule not running.","$ref":"#/components/schemas/u32"},"matched":{"description":"The signal that decided, or `None` when nothing matched and every variant was kept.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.MatchedRung"}]},"total":{"$ref":"#/components/schemas/u32"}}},"tier1.VariantDisambiguationOutcome":{"description":"What variant disambiguation did to a result. Absent when it did not run at all.","type":"object","title":"tier1.VariantDisambiguationOutcome","required":["brands","market"],"properties":{"brands":{"description":"One entry per brand that had a rule. A brand without one keeps every variant and is\nabsent, so an empty list means nothing in this result was a candidate for narrowing.","type":"array","items":{"$ref":"#/components/schemas/tier1.VariantDisambiguationBrand"}},"market":{"description":"The viewing market the rule resolved against: the override's market, or the caller's\norganization country. When `matched` names a `registration_*` rung, the decisive\ncountry was the vehicle's registration country, which this field does not carry.","$ref":"#/components/schemas/iso_country.CountryCode"}}},"tier1.VariantDisambiguationOverride":{"description":"A caller's overrides for variant disambiguation.\n\nExists for the DataQA variant tool, whose whole job is inspecting the variants a rule\nwould otherwise pick between: staff need to see the full set, or to ask what an\norganization in another market would have been served.\n\nA struct rather than an enum because the axes have to compose. `market` is the only one\ntoday, but the rules that follow it — colour, grade, options — are separate questions\nabout the same search, and a caller pinning two of them must not have to choose which one\nsurvives. All fields at their default means: narrow to the vehicle's registration country\nwhen one is known, falling back to the organization's. That default is also the only shape\na non-staff caller may send — any other is refused with `forbidden`, never downgraded to\nthe default and served as though it had been honoured.","type":"object","title":"tier1.VariantDisambiguationOverride","properties":{"disabled":{"description":"Skip market-based narrowing.\n\nNot \"every variant the EPC holds\": when `ml_disambiguation` is set, variants the\nwriter marked `Remove` are dropped regardless of this field — both before this rule\nwould have run and again on the way out. This returns what survives that.\n\nWins over every other field: a request that both disables narrowing and pins an axis\nis contradictory, and showing more than was asked for is the inspectable failure.","$ref":"#/components/schemas/bool"},"market":{"description":"Narrow as though the caller were an organization in this country.\n\nThe country is read as the *viewing* market, replacing the organization's own, and the\nvehicle's registration country is dropped rather than forced to match: a market a\nperson picked is not a claim about where the vehicle was registered. Dropping it also\nkeeps an exact-country variant ahead of a market-group one, which is the order someone\nasking \"what does Australia resolve to\" expects.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/iso_country.CountryCode"}]}}},"tier1.VehicleEmbeddingItemType":{"oneOf":[{"const":"part"},{"const":"diagram"}]},"tier1.VehicleIdentifier":{"oneOf":[{"type":"object","title":"ChassisNumber","required":["chassis_number"],"properties":{"chassis_number":{"$ref":"#/components/schemas/std.string.String"}}},{"$ref":"#/components/schemas/tier1.VrmPlateRequest"}]},"tier1.VehicleSearchError":{"oneOf":[{"description":"The request could not be authenticated. Check your API credentials.","type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"not_found","description":"No vehicle data could be resolved for the supplied identifier."},{"description":"The VRM request parameters are invalid.","type":"object","title":"bad_vrm_request","required":["bad_vrm_request"],"properties":{"bad_vrm_request":{"$ref":"#/components/schemas/std.string.String"}}},{"description":"The staff cache-refresh parameters are invalid (e.g. a freshness target\nthe server clock can never satisfy).","type":"object","title":"bad_refresh_request","required":["bad_refresh_request"],"properties":{"bad_refresh_request":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"forbidden","description":"You do not have permission to access this resource."},{"const":"preparation_timeout","description":"The vehicle data preparation timed out. Please retry your request."},{"const":"temporary_failure","description":"The service is temporarily unavailable. Please retry your request."},{"description":"Too many requests. Retry after the indicated delay.","type":"object","title":"rate_limited","required":["rate_limited"],"properties":{"rate_limited":{"description":"Too many requests. Retry after the indicated delay.","type":"object","title":"rate_limited","required":["message","retry_after"],"properties":{"message":{"description":"Operator-set guidance on how to get off the foreground path.\nServer-supplied so it can change without a client release.","$ref":"#/components/schemas/std.string.String"},"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}}]},"tier1.VehicleSearchFeatures":{"description":"Vehicle Search Configuration for the optional search features.","type":"object","title":"tier1.VehicleSearchFeatures","required":["denylist","ml_disambiguation","receive_raw_properties"],"properties":{"allow_no_diagram_providers":{"description":"Whether to allow providers without diagrams to be used during vehicle resolution.","$ref":"#/components/schemas/bool"},"denylist":{"$ref":"#/components/schemas/bool"},"ingest_oem_image":{"description":"Whether to ingest OEM diagram images during the vehicle-prepare assembly pre-warm.\nDefaults to `true`. Set to `false` in test environments to skip image ingestion.","$ref":"#/components/schemas/bool"},"ml_disambiguation":{"$ref":"#/components/schemas/bool"},"receive_raw_properties":{"$ref":"#/components/schemas/bool"},"refresh":{"description":"DataQA o2t staff refresh depth: how far to bypass the EPC caches\n(reprocess the E2E bundle, or also re-fetch the raw provider response).\nRestricted to Partly staff (dropped to `Cached` for non-staff callers).","$ref":"#/components/schemas/tier1.EpcRefresh"},"request_source":{"description":"The source of the request.","$ref":"#/components/schemas/tier1.RequestSource"},"skip_epc_block_rules":{"description":"When true, bypasses non-`ts-vin` EPC block rules during upstream vehicle resolution.\nRestricted to Partly staff and QA staff.","$ref":"#/components/schemas/bool"},"skip_epc_ts_vin_rules":{"description":"When true, bypasses `ts-vin` EPC block rules during upstream vehicle resolution.\nRestricted to callers with the appropriate override permission.","$ref":"#/components/schemas/bool"},"variant_disambiguation":{"description":"Overrides how variant disambiguation runs for this one search.\nRestricted to Partly staff (rejected outright for non-staff callers).","$ref":"#/components/schemas/tier1.VariantDisambiguationOverride"}}},"tier1.VehicleSearchRequest":{"description":"A request to search for a vehicle and its associated UDEFs/OemVehicleIds based on a\n[`VehicleIdentifier`].","type":"object","title":"tier1.VehicleSearchRequest","required":["identifier","priority"],"properties":{"features":{"description":"The featureset to use for the vehicle search. Defaults to all features enabled.","$ref":"#/components/schemas/tier1.VehicleSearchFeatures"},"identifier":{"description":"The identifier to search for the vehicle by, see [`VehicleIdentifier`].","$ref":"#/components/schemas/tier1.VehicleIdentifier"},"languages":{"description":"The languages to return the tree in. If this is empty, the default language will be used.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"priority":{"description":"Queue priority for this search.","$ref":"#/components/schemas/tier1.Priority"},"providers":{"description":"The OEM catalog providers to search for the vehicle in. If this is empty, all providers will\nbe used.","$ref":"#/components/schemas/tier1.ProviderSelection"}}},"tier1.VehicleSearchResponse":{"oneOf":[{"type":"object","title":"in_progress","required":["in_progress"],"properties":{"in_progress":{"type":"object","title":"in_progress","required":["retry_after"],"properties":{"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"description":"Provisional not-found: the plate's VRM lookup returned no match but is\nstill on its slow-retry schedule, so we can't yet resolve a chassis to\ndrive the EPC search. Surfaced (instead of an indefinite `in_progress`)\nso callers can show \"no vehicle found yet\" rather than spin for the full\nslow-retry window. Mirrors [`VrmSearchOutcome::NotFoundPending`]. Callers\nmay keep polling after `retry_after` — a newly-registered plate or a\ncleared upstream blip can still upgrade a later poll to `Completed`. A\n*terminal* not-found is still returned as `Err(VehicleSearchError::NotFound)`.","type":"object","title":"not_found_pending","required":["not_found_pending"],"properties":{"not_found_pending":{"description":"Provisional not-found: the plate's VRM lookup returned no match but is\nstill on its slow-retry schedule, so we can't yet resolve a chassis to\ndrive the EPC search. Surfaced (instead of an indefinite `in_progress`)\nso callers can show \"no vehicle found yet\" rather than spin for the full\nslow-retry window. Mirrors [`VrmSearchOutcome::NotFoundPending`]. Callers\nmay keep polling after `retry_after` — a newly-registered plate or a\ncleared upstream blip can still upgrade a later poll to `Completed`. A\n*terminal* not-found is still returned as `Err(VehicleSearchError::NotFound)`.","type":"object","title":"not_found_pending","required":["retry_after"],"properties":{"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"type":"object","title":"completed","required":["completed"],"properties":{"completed":{"type":"object","title":"completed","properties":{"chassis_number":{"description":"The chassis number associated with this vehicle, we prefer the number\nprovided by the EPC if it is available but will fallback to a VRM\nprovided chassis number otherwise. Note that if you searched with an\nNZTA vin number we will automatically convert this into a JDM frame\nnumber if possible.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gapc_brand":{"description":"The GAPC brand of this vehicle if available.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oem_brand":{"description":"The OEM of this vehicle, e.g. Toyota. Sourced from the VRM search if available.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"uvdb_properties":{"description":"A list of UVDB property suids associated with this vehicle, e.g. engine type, model code, etc. Sourced from VRM search.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"uvdb_vehicle_definitions":{"description":"Possible UVDB vehicle definitions associated with this vehicle. Sourced from VRM search.","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"variant_disambiguation":{"description":"What variant disambiguation did to `variants`, when it ran. Absent when it did\nnot — a caller that disabled it, or an organization the rollout has not reached.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.VariantDisambiguationOutcome"}]},"variants":{"description":"Information about possible exact EPC matches for this vehicle.","type":"array","items":{"$ref":"#/components/schemas/tier1.VehicleVariant"}},"vrm_properties":{"description":"VRM properties associated with this vehicle, these are non-vehicle properties. E.g. registration date, number of owners.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.VrmProperties"}]}}}}}]},"tier1.VehicleVariant":{"type":"object","title":"tier1.VehicleVariant","required":["id","properties","uvdb_property_ids"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"properties":{"description":"Semi-Structured extracted vehicle attributes","type":"array","items":{"$ref":"#/components/schemas/tier1.OemVehicleProperty"}},"raw_properties":{"deprecated":true,"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}]},"typed_properties":{"description":"`properties` with each typed value marked known (with a stable id) or raw. Filled on\nevery tier1 response by [`VehicleVariant::with_typed_properties`]; absent only on cached\nvariants that predate it and on variants a client builds itself.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.TypedVehicleProperties"}]},"uvdb_property_ids":{"description":"Direct extracted UVDB properties","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}}},"tier1.VideoAnalysisConfigNullable":{"description":"VideoAnalysisConfigNullable","type":"object","title":"tier1.VideoAnalysisConfigNullable","properties":{"model":{"description":"GenAI model. Must support vision.","$ref":"#/components/schemas/std.string.String"},"system_prompt":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.VideoAnalysisInput":{"description":"VideoAnalysisInput","type":"object","title":"tier1.VideoAnalysisInput","required":["video_uri"],"properties":{"job_context":{"description":"Optional job context describing the damage (e.g. repairer notes, claim description)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"repairer_code_context":{"description":"Custom repairer notation codes. If empty, uses defaults (N, Slide, PR, NCR).","type":"object","additionalProperties":{"$ref":"#/components/schemas/std.string.String"}},"video_uri":{"description":"Video file URI (mp4/webm/mov/avi); frontend extracts frames for analysis","$ref":"#/components/schemas/std.string.String"}}},"tier1.VideoAnalysisOutput":{"description":"VideoAnalysisOutput","type":"object","title":"tier1.VideoAnalysisOutput","required":["damage_summary"],"properties":{"damage_summary":{"description":"Holistic 3-5 sentence summary of all visible vehicle damage","$ref":"#/components/schemas/std.string.String"},"damaged_parts":{"description":"Parts observed to be damaged in the video","type":"array","items":{"$ref":"#/components/schemas/tier1.VideoDamagedPart"}},"keyframes":{"description":"Key frames extracted from video ordered by timestamp","type":"array","items":{"$ref":"#/components/schemas/tier1.KeyFrame"}}}},"tier1.VideoAnalysisRequest":{"description":"VideoAnalysisRequest","type":"object","title":"tier1.VideoAnalysisRequest","required":["data"],"properties":{"config":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.VideoAnalysisConfigNullable"}]},"data":{"$ref":"#/components/schemas/tier1.VideoAnalysisInput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]}}},"tier1.VideoAnalysisResponse":{"description":"VideoAnalysisResponse","type":"object","title":"tier1.VideoAnalysisResponse","required":["data","metadata"],"properties":{"data":{"$ref":"#/components/schemas/tier1.VideoAnalysisOutput"},"metadata":{"oneOf":[{"description":"Null","type":"null"},{"description":"Key-value map type","type":"object","additionalProperties":{"$ref":"#/components/schemas/serde_json.Value"}}]},"prediction_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/uuid.Uuid"}]}}},"tier1.VideoDamagedPart":{"description":"VideoDamagedPart","type":"object","title":"tier1.VideoDamagedPart","required":["damage_reason","quantity","raw_part_name","replacement_reason","severity","source_frame"],"properties":{"confidence":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.Confidence"}]},"damage_reason":{"$ref":"#/components/schemas/std.string.String"},"quantity":{"$ref":"#/components/schemas/u64"},"raw_part_name":{"$ref":"#/components/schemas/std.string.String"},"recommended_action":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.RecommendedAction"}]},"replacement_reason":{"$ref":"#/components/schemas/std.string.String"},"severity":{"$ref":"#/components/schemas/tier1.Severity"},"source_frame":{"description":"Primary source frame timestamp in MM:SS or HH:MM:SS","$ref":"#/components/schemas/std.string.String"}}},"tier1.View":{"oneOf":[{"const":"wide"},{"const":"closeup"}]},"tier1.VinDenyListUpdate":{"type":"object","title":"tier1.VinDenyListUpdate","required":["denylisted_providers","oem_vehicle_id","skip_reason","skipped"],"properties":{"denylisted_providers":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"},"skip_reason":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"skipped":{"$ref":"#/components/schemas/bool"}}},"tier1.VinDenylistCacheGetRequest":{"description":"A request to check which providers are denylisted in the VIN denylist cache for a given chassis number.","type":"object","title":"tier1.VinDenylistCacheGetRequest","required":["chassis_number"],"properties":{"chassis_number":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.VinPermissionCacheGetRequest":{"description":"A request to check both the allowlist and denylist for a given vin.","type":"object","title":"tier1.VinPermissionCacheGetRequest","required":["oem_vehicle_id"],"properties":{"oem_vehicle_id":{"$ref":"#/components/schemas/std.string.String"}}},"tier1.VinStatus":{"type":"object","title":"tier1.VinStatus","required":["assembly_cache_status","chassis_number","vehicle_cache_status","vehicle_queue_eta","will_fail_allowlist_check","will_fail_denylist_check"],"properties":{"assembly_cache_status":{"description":"The [`CacheStatus`] of this [`OemVehicleId`] for doing an AssemblySearch.","$ref":"#/components/schemas/tier1.CacheStatus"},"assembly_cache_timestamp":{"description":"When the assembly cache last transitioned state.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"chassis_number":{"$ref":"#/components/schemas/std.string.String"},"oem_vehicle_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"vehicle_cache_status":{"description":"The [`CacheStatus`] of this [`ChassisNumber`], should be the same for all `OemVehicleId`'s.","$ref":"#/components/schemas/tier1.CacheStatus"},"vehicle_cache_timestamp":{"description":"When the vehicle cache last transitioned state.","oneOf":[{"description":"Null","type":"null"},{"description":"DateTime at a given timezone (RFC3339 format)","type":"string","format":"date-time"}]},"vehicle_queue_eta":{"description":"Estimated time until `vehicle_cache_status` next changes. Derived from the\nchassis-level cache entity, so it is the same for every `OemVehicleId` on\nthis [`ChassisNumber`].","$ref":"#/components/schemas/tier1.QueueEta"},"will_fail_allowlist_check":{"description":"If `true` then this `OemVehicleId` + Organisation is subject to the\nallowlist and this user is not authorised. Assembly searches will not\nsucceed for this [`ChassisNumber`] regardless of the [`OemVehicleId`].","deprecated":true,"$ref":"#/components/schemas/bool"},"will_fail_denylist_check":{"description":"If `true` then this `OemVehicleId` has been denylisted and will not resolve if used for an AssemblySearch.","$ref":"#/components/schemas/bool"}}},"tier1.VinStatusResponse":{"type":"object","title":"tier1.VinStatusResponse","required":["is_allowlisted","is_denylisted","should_retry"],"properties":{"is_allowlisted":{"$ref":"#/components/schemas/bool"},"is_denylisted":{"$ref":"#/components/schemas/bool"},"should_retry":{"$ref":"#/components/schemas/bool"}}},"tier1.VisionAnnotationBulkInput":{"description":"VisionAnnotationBulkInput","type":"object","title":"tier1.VisionAnnotationBulkInput","required":["instances","vin"],"properties":{"instances":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.VisionAnnotationDiagramDataInput"}},"prediction_type":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.PredictionType"}]},"refresh_cache":{"description":"realtime_sync only: skip the cache read and overwrite it with a fresh prediction","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"vin":{"description":"Vin / chassis number for a request, used to invalidate the cache in testing","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.VisionAnnotationDiagramDataInput":{"description":"VisionAnnotationDiagramDataInput","type":"object","title":"tier1.VisionAnnotationDiagramDataInput","required":["diagram_id","objects"],"properties":{"diagram_code":{"description":"Diagram Code","$ref":"#/components/schemas/std.string.String"},"diagram_id":{"$ref":"#/components/schemas/std.string.String"},"diagram_name":{"description":"Diagram Name, if diagram will go through ml if not provided","$ref":"#/components/schemas/std.string.String"},"make":{"description":"Make of the Diagram","$ref":"#/components/schemas/std.string.String"},"objects":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.VisionAnnotationObjectDataInput"}},"source":{"description":"Source of the data, e.g., data provider, ml, overrides, caches","$ref":"#/components/schemas/std.string.String"}}},"tier1.VisionAnnotationDiagramDataOutput":{"description":"VisionAnnotationDiagramDataOutput","type":"object","title":"tier1.VisionAnnotationDiagramDataOutput","required":["diagram_code","diagram_id","diagram_name","make","objects","source"],"properties":{"diagram_code":{"description":"Diagram Code","$ref":"#/components/schemas/std.string.String"},"diagram_id":{"$ref":"#/components/schemas/std.string.String"},"diagram_name":{"description":"Diagram Name, if diagram will go through ml if not provided","$ref":"#/components/schemas/std.string.String"},"make":{"description":"Make of the Diagram","$ref":"#/components/schemas/std.string.String"},"objects":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.VisionAnnotationObjectDataOutput"}},"source":{"description":"Source of the data, e.g., data provider, ml, overrides, caches","$ref":"#/components/schemas/std.string.String"}}},"tier1.VisionAnnotationObjectDataInput":{"description":"VisionAnnotationObjectDataInput","type":"object","title":"tier1.VisionAnnotationObjectDataInput","required":["bounding_box","code","description","object_id","type"],"properties":{"bounding_box":{"$ref":"#/components/schemas/tier1.input.BoundingBox"},"code":{"description":"Object code for a diagram, e.g.  pnc for a pnc type object, or reference code for a reference type object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"coordinates":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.input.Coordinate"}}}]},"description":{"description":"Object description, e.g. pnc description for a pnc type object, or symbol shape description for a symbol type object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"future_masks":{"description":"temporary future masks for parts interpretation","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.input.Coordinate"}}},"is_assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_hidden":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"links":{"description":"List of object ids that this object is linked to","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"mask_info":{"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}},"masks":{"description":"Key:Value pairs to match mask. Key is the mask type, value is the polygon coordinates","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.input.Coordinate"}}},"object_id":{"$ref":"#/components/schemas/std.string.String"},"origin_info":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"origins":{"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.input.Coordinate"}}},"part_info":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"part_relationship":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"type":{"description":"Object type for a diagram, e.g. 'pnc', 'reference', 'symbol'","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.VisionAnnotationObjectDataOutput":{"description":"VisionAnnotationObjectDataOutput","type":"object","title":"tier1.VisionAnnotationObjectDataOutput","required":["bounding_box","code","description","object_id","type"],"properties":{"bounding_box":{"$ref":"#/components/schemas/tier1.output.BoundingBox"},"code":{"description":"Object code for a diagram, e.g.  pnc for a pnc type object, or reference code for a reference type object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"coordinates":{"oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.output.Coordinate"}}}]},"description":{"description":"Object description, e.g. pnc description for a pnc type object, or symbol shape description for a symbol type object","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"future_masks":{"description":"temporary future masks for parts interpretation","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.output.Coordinate"}}},"is_assembly":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"is_hidden":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/bool"}]},"links":{"description":"List of object ids that this object is linked to","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"mask_info":{"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}}},"masks":{"description":"Key:Value pairs to match mask. Key is the mask type, value is the polygon coordinates","type":"object","additionalProperties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.output.Coordinate"}}},"object_id":{"$ref":"#/components/schemas/std.string.String"},"origin_info":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"origins":{"description":"Expandable array type","type":"array","items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/tier1.output.Coordinate"}}},"part_info":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"part_relationship":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"type":{"description":"Object type for a diagram, e.g. 'pnc', 'reference', 'symbol'","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.VrmChassisNumberRequest":{"description":"VIN/chassis-number-based VRM prepare request.\nJSON: `{ \"chassis_number\": \"...\", \"region\": ..., \"state\": \"...\" }`","type":"object","title":"tier1.VrmChassisNumberRequest","required":["chassis_number","region"],"properties":{"chassis_number":{"description":"The chassis number (VIN or frame number) to look up.","$ref":"#/components/schemas/std.string.String"},"region":{"description":"The country the vehicle is from, represented as a [`suid_rs::RegionSuid`].","$ref":"#/components/schemas/std.string.String"},"request_source":{"description":"The source of the request.","$ref":"#/components/schemas/tier1.RequestSource"},"state":{"description":"The state the vehicle is from. Optional as not all countries have states.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.VrmPlateRequest":{"description":"Plate-based VRM prepare request.\nJSON: `{ \"plate\": \"...\", \"region\": ..., \"state\": \"...\" }`","type":"object","title":"tier1.VrmPlateRequest","required":["plate","region"],"properties":{"plate":{"description":"The plate to search for.","$ref":"#/components/schemas/std.string.String"},"region":{"description":"The country the plate is from, represented as a [`suid_rs::RegionSuid`].","$ref":"#/components/schemas/std.string.String"},"request_source":{"description":"The source of the request.","$ref":"#/components/schemas/tier1.RequestSource"},"state":{"description":"The state the plate is from. Optional as not all countries have states.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"tier1.VrmProperties":{"type":"object","title":"tier1.VrmProperties","properties":{"number_of_owners":{"description":"Number of previous owners (including current owner)","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"previous_registration_country":{"description":"Country the vehicle was registered in before import, in the provider's own spelling\n(mostly ISO alpha-3). Held as a string, not a typed country: this struct is a cached\npayload, so an entry written before a spelling was recognised must still round-trip.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"registration_events":{"description":"Array of registration event timestamps ordered from most recent to oldest. Stored as UNIX UTC timestamps in milliseconds.","oneOf":[{"description":"Null","type":"null"},{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/f64"}}]}}},"tier1.VrmRequest":{"oneOf":[{"$ref":"#/components/schemas/tier1.VrmPlateRequest"},{"$ref":"#/components/schemas/tier1.VrmChassisNumberRequest"}]},"tier1.VrmSearchOutcome":{"oneOf":[{"description":"The VRM lookup is queued or in progress. Re-poll after `retry_after`.","type":"object","title":"in_progress","required":["in_progress"],"properties":{"in_progress":{"description":"The VRM lookup is queued or in progress. Re-poll after `retry_after`.","type":"object","title":"in_progress","required":["retry_after"],"properties":{"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"description":"Provisional not-found: the provider returned no match, but the lookup is\nstill on its slow-retry schedule (e.g. a newly-registered plate may\nbecome findable later, or an upstream blip may clear). Callers should\nshow \"no vehicle found\" immediately rather than block on a spinner, but\nmay keep polling after `retry_after` — a later attempt can still upgrade\nto `Completed`. Contrast with the terminal not-found, which is returned\nas `Err(VrmSearchError::InvalidRequest(NotFound))` once the slow-retry\nbudget is exhausted.","type":"object","title":"not_found_pending","required":["not_found_pending"],"properties":{"not_found_pending":{"description":"Provisional not-found: the provider returned no match, but the lookup is\nstill on its slow-retry schedule (e.g. a newly-registered plate may\nbecome findable later, or an upstream blip may clear). Callers should\nshow \"no vehicle found\" immediately rather than block on a spinner, but\nmay keep polling after `retry_after` — a later attempt can still upgrade\nto `Completed`. Contrast with the terminal not-found, which is returned\nas `Err(VrmSearchError::InvalidRequest(NotFound))` once the slow-retry\nbudget is exhausted.","type":"object","title":"not_found_pending","required":["retry_after"],"properties":{"retry_after":{"$ref":"#/components/schemas/std.time.Duration"}}}}},{"description":"Terminal: the VRM lookup completed (successfully or with a found-but-\nempty result). Carries the resolved VRM data.","type":"object","title":"completed","required":["completed"],"properties":{"completed":{"$ref":"#/components/schemas/tier1.VrmSearchResponse"}}}]},"tier1.VrmSearchResponse":{"type":"object","title":"tier1.VrmSearchResponse","properties":{"chassis":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"gapc_brand_id":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oem_brand":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"oem_model":{"description":"Provider's raw model string, present even when no UMOD resolved.\nDisplay-only: unnormalised provider text, never a substitute for a\n`ModelSuid` in fitment or parts lookup.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"uvdb_properties":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"uvdb_vehicle_definitions":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/std.string.String"}},"vrm_properties":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/tier1.VrmProperties"}]}}},"tier1.YearMonth":{"type":"object","title":"tier1.YearMonth","required":["year"],"properties":{"month":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u16"}]},"year":{"$ref":"#/components/schemas/u16"}}},"tier1.input.BoundingBox":{"description":"BoundingBox","type":"object","title":"tier1.input.BoundingBox","required":["bottom_right","top_left"],"properties":{"bottom_right":{"$ref":"#/components/schemas/tier1.input.Coordinate"},"top_left":{"$ref":"#/components/schemas/tier1.input.Coordinate"}}},"tier1.input.Coordinate":{"description":"Coordinate","type":"object","title":"tier1.input.Coordinate","required":["x","y"],"properties":{"x":{"$ref":"#/components/schemas/i64"},"y":{"$ref":"#/components/schemas/i64"}}},"tier1.output.BoundingBox":{"description":"An axis-aligned bounding box defined by two corners.\nOrigin is at the top-left of the image, with X increasing rightward and Y increasing downward.","type":"object","title":"tier1.output.BoundingBox","required":["bottom_right","top_left"],"properties":{"bottom_right":{"description":"Bottom-right corner of the bounding box.","$ref":"#/components/schemas/tier1.output.Coordinate"},"top_left":{"description":"Top-left corner of the bounding box.","$ref":"#/components/schemas/tier1.output.Coordinate"}}},"tier1.output.Coordinate":{"description":"A 2D coordinate point representing a pixel position.\nOrigin (0, 0) is at the top-left of the image, with X increasing rightward and Y increasing downward.","type":"object","title":"tier1.output.Coordinate","required":["x","y"],"properties":{"x":{"description":"X coordinate (horizontal position in pixels from left edge).","$ref":"#/components/schemas/u32"},"y":{"description":"Y coordinate (vertical position in pixels from top edge).","$ref":"#/components/schemas/u32"}}},"u16":{"description":"16-bit unsigned integer","type":"integer"},"u32":{"description":"32-bit unsigned integer","type":"integer"},"u64":{"description":"64-bit unsigned integer","type":"integer"},"u8":{"description":"8-bit unsigned integer","type":"integer"},"upload.DownloadFileErrorDetails":{"oneOf":[{"type":"object","title":"timeout","required":["timeout"],"properties":{"timeout":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"network","required":["network"],"properties":{"network":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"other","required":["other"],"properties":{"other":{"$ref":"#/components/schemas/std.string.String"}}}]},"upload.UploadFileKind":{"oneOf":[{"const":"image"},{"const":"video"},{"const":"audio"},{"const":"document"},{"const":"diagram","description":"Partly specific format which describes assembly diagram documents\nwith hotspot coordinates"}]},"upload.UploadIdentity":{"oneOf":[{"$ref":"#/components/schemas/std.string.String"},{"$ref":"#/components/schemas/std.string.String"}]},"upload.UploadKind":{"oneOf":[{"const":"file_import"},{"type":"object","title":"sellable_media_file_upload","required":["sellable_media_file_upload"],"properties":{"sellable_media_file_upload":{"$ref":"#/components/schemas/upload.UploadFileKind"}}},{"type":"object","title":"part_media_file_upload","required":["part_media_file_upload"],"properties":{"part_media_file_upload":{"$ref":"#/components/schemas/upload.UploadFileKind"}}},{"type":"object","title":"order_media_file_upload","required":["order_media_file_upload"],"properties":{"order_media_file_upload":{"$ref":"#/components/schemas/upload.UploadFileKind"}}},{"type":"object","title":"organisation_media_file_upload","required":["organisation_media_file_upload"],"properties":{"organisation_media_file_upload":{"$ref":"#/components/schemas/upload.UploadFileKind"}}},{"type":"object","title":"ghca_media_file_upload","required":["ghca_media_file_upload"],"properties":{"ghca_media_file_upload":{"$ref":"#/components/schemas/upload.UploadFileKind"}}}]},"upload.UploadsDeleteError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"const":"not_found"}]},"upload.UploadsDeleteRequest":{"type":"object","title":"upload.UploadsDeleteRequest","required":["identity"],"properties":{"identity":{"description":"Identity of the upload which needs to be removed","$ref":"#/components/schemas/upload.UploadIdentity"}}},"upload.UploadsInsertError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"forbidden"},{"type":"object","title":"invalid_external_url","required":["invalid_external_url"],"properties":{"invalid_external_url":{"oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},{"const":"invalid_image_format"},{"type":"object","title":"unsupported_target_image_format","required":["unsupported_target_image_format"],"properties":{"unsupported_target_image_format":{"$ref":"#/components/schemas/std.string.String"}}},{"type":"object","title":"file_download","required":["file_download"],"properties":{"file_download":{"$ref":"#/components/schemas/upload.DownloadFileErrorDetails"}}},{"type":"object","title":"file_too_large","required":["file_too_large"],"properties":{"file_too_large":{"type":"object","title":"file_too_large","required":["actual_file_size_bytes","max_file_size_bytes"],"properties":{"actual_file_size_bytes":{"$ref":"#/components/schemas/usize"},"max_file_size_bytes":{"$ref":"#/components/schemas/usize"}}}}}]},"upload.UploadsInsertRequest":{"type":"object","title":"upload.UploadsInsertRequest","required":["external_url","upload_kind"],"properties":{"external_url":{"description":"URL which is used for downloading the external image for subsequent upload it to the cloud storage","$ref":"#/components/schemas/std.string.String"},"target_file_mime_type":{"description":"Target mime type for the upload. If not provided then original extension and format will be used.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/remote_file_provider.UploadFileMimeType"}]},"upload_kind":{"description":"Type of the upload. Can be `file_import`, `sellable_media_file_upload`, `part_media_file_upload`, `order_media_file_upload`, `organisation_media_file_upload`","$ref":"#/components/schemas/upload.UploadKind"}}},"upload.UploadsInsertResponse":{"type":"object","title":"upload.UploadsInsertResponse","required":["content_hash","image_height","image_width","public_url","storage_file_path","thumbnail_public_url","thumbnail_storage_file_path"],"properties":{"content_hash":{"description":"Deprecated","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"image_height":{"description":"Height of the image in pixels, if applicable","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"image_width":{"description":"Width of the image in pixels, if applicable","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/u32"}]},"public_url":{"description":"Public url for accessing this media file.\nIf `public_access` flag is `false` then `public_url` is not generated.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"storage_file_path":{"description":"Internal file path in cloud storage bucket when file is uploaded via `external_url` link","$ref":"#/components/schemas/std.string.String"},"thumbnail_public_url":{"description":"Public url to compressed media file in case of it is image.\nIf `public_access` flag is `false` then `thumbnail_public_url` is not generated.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"thumbnail_storage_file_path":{"description":"Internal thumbnail file path in cloud storage bucket when file is uploaded via `external_url` link and file is an image","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]}}},"upload.UploadsPrepareError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"type":"object","title":"invalid_file_extension","required":["invalid_file_extension"],"properties":{"invalid_file_extension":{"$ref":"#/components/schemas/std.string.String"}}},{"const":"forbidden"}]},"upload.UploadsPrepareRequest":{"type":"object","title":"upload.UploadsPrepareRequest","required":["file_name","upload_kind"],"properties":{"file_name":{"description":"File name with extension if applicable","$ref":"#/components/schemas/std.string.String"},"upload_kind":{"description":"Type of the upload. Can be `file_import`, `sellable_media_file_upload`, `part_media_file_upload`, `order_media_file_upload`, `organisation_media_file_upload`","$ref":"#/components/schemas/upload.UploadKind"}}},"upload.UploadsPrepareResponse":{"type":"object","title":"upload.UploadsPrepareResponse","required":["public_url","storage_file_path","upload_url"],"properties":{"public_url":{"description":"Public url for accessing this media file when file is uploaded via `upload_url` link.\nIf `public_access` flag is `false` then `public_url` is not generated.","oneOf":[{"description":"Null","type":"null"},{"$ref":"#/components/schemas/std.string.String"}]},"storage_file_path":{"description":"Internal file path in cloud storage bucket when file is uploaded via `upload_url` link","$ref":"#/components/schemas/std.string.String"},"upload_url":{"description":"pre-signed-url for uploading a media file into cloud storage (S3, GCS)","$ref":"#/components/schemas/std.string.String"}}},"usize":{"description":"Machine-specific-bit unsigned integer","type":"integer"},"uuid.Uuid":{"description":"UUID value type","type":"string","format":"uuid"},"uvdb.SearchError":{"oneOf":[{"type":"object","title":"unauthorized","required":["unauthorized"],"properties":{"unauthorized":{"$ref":"#/components/schemas/auth.AuthError"}}},{"const":"starts_with_too_short"},{"const":"forbidden"}]},"uvdb.SearchItem":{"type":"object","title":"uvdb.SearchItem","required":["id","value"],"properties":{"id":{"$ref":"#/components/schemas/std.string.String"},"value":{"$ref":"#/components/schemas/std.string.String"}}},"uvdb.SearchRequest":{"type":"object","title":"uvdb.SearchRequest","required":["starts_with","uvdb_type"],"properties":{"starts_with":{"$ref":"#/components/schemas/std.string.String"},"uvdb_type":{"$ref":"#/components/schemas/uvdb.UvdbType"}}},"uvdb.SearchResponse":{"type":"object","title":"uvdb.SearchResponse","required":["items"],"properties":{"items":{"description":"Expandable array type","type":"array","items":{"$ref":"#/components/schemas/uvdb.SearchItem"}}}},"uvdb.UvdbType":{"oneOf":[{"const":"uvdb_make"}]}}}}