AlayaCare · Schema
AlayaCare Market API Schemas
Home CareCommunity CareHealthcareSchedulingClinicalBillingClient ManagementCare ManagementAged CareWorkforce Management
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "AlayaCare Market API Schemas",
"definitions": {
"StatusHealthzResponse": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
]
},
"OutboxOfferCore": {
"type": "object",
"properties": {
"care_type": {
"$ref": "#/components/schemas/CareTypeCore"
},
"offer_type": {
"$ref": "#/components/schemas/OfferTypeCore"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"comment": {
"type": "string"
},
"demand_labels": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"required": [
"care_type",
"offer_type",
"expires_at"
]
},
"OutboxOfferCreateRequest": {
"type": "object",
"properties": {
"offer": {
"$ref": "#/components/schemas/OutboxOfferCore"
},
"alayacare": {
"$ref": "#/components/schemas/OutboxAlayaCareCore"
},
"case_manager": {
"$ref": "#/components/schemas/CaseManagerCore"
},
"direct_supply_persona_ids": {
"description": "Identifiers of one (or more) supply organization for direct-to-supplier\nmatching.\n",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"price": {
"$ref": "#/components/schemas/OutboxOfferPriceCore"
},
"client": {
"$ref": "#/components/schemas/OutboxOfferClientRequest"
},
"service": {
"$ref": "#/components/schemas/OutboxServiceRequest"
},
"visits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutboxOfferVisitRequest"
}
}
},
"required": [
"offer",
"client",
"service"
]
},
"OutboxShiftOfferCore": {
"type": "object",
"properties": {
"care_type": {
"$ref": "#/components/schemas/CareTypeCore"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"comment": {
"type": "string"
},
"demand_labels": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"required": [
"care_type",
"expires_at"
]
},
"OutboxShiftOfferItem": {
"type": "object",
"properties": {
"price": {
"$ref": "#/components/schemas/OutboxOfferPriceCore"
},
"client": {
"$ref": "#/components/schemas/OutboxOfferClientRequest"
},
"service": {
"$ref": "#/components/schemas/OutboxServiceRequest"
},
"visits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutboxOfferVisitRequest"
}
}
},
"required": [
"client",
"service",
"visits"
]
},
"OutboxShiftOfferCreateRequest": {
"type": "object",
"properties": {
"offer": {
"$ref": "#/components/schemas/OutboxShiftOfferCore"
},
"direct_supply_persona_ids": {
"description": "Identifiers of one (or more) supply organization for direct-to-supplier\nmatching.\n",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"case_manager": {
"$ref": "#/components/schemas/CaseManagerCore"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutboxShiftOfferItem"
}
}
},
"required": [
"offer",
"items"
]
},
"OutboxShiftOfferCreateResponse": {
"type": "object",
"properties": {
"shift": {
"title": "OutboxShiftOfferCreateShiftResponse",
"description": "The `shift` object included in the response when creating a shift offer.",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"id"
]
},
"items": {
"type": "array",
"items": {
"title": "OutboxShiftOfferCreateItemsResponse",
"description": "The `item` objects included in the response when creating a shift offer.",
"type": "object",
"properties": {
"offer": {
"title": "OutboxShiftOfferCreateItemOfferResponse",
"description": "The `offer` object included in the response when creating a shift offer.",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"care_type": {
"$ref": "#/components/schemas/CareTypeCore"
},
"start_at": {
"type": "string",
"format": "date-time",
"description": "Derived from the visits"
},
"end_at": {
"type": "string",
"format": "date-time",
"description": "Derived from the visits"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"demand_labels": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"required": [
"id",
"care_type",
"start_at",
"end_at",
"expires_at",
"created_at"
]
},
"client": {
"title": "OutboxShiftOfferCreateItemClientResponse",
"description": "The `client` object included in the response when creating a shift offer.",
"type": "object",
"properties": {
"outbox_id": {
"type": "string",
"minLength": 1
},
"demographics": {
"title": "OutboxShiftOfferCreateItemClientDemographicsResponse",
"description": "The `client` `demographics` object included in the response when creating a shift offer.",
"type": "object",
"properties": {
"first_name": {
"type": "string",
"minLength": 1
},
"last_name": {
"type": "string",
"minLength": 1
}
},
"required": [
"first_name",
"last_name"
]
}
},
"required": [
"outbox_id",
"demographics"
]
},
"service": {
"title": "OutboxShiftOfferCreateItemServiceResponse",
"description": "The `service` object included in the response when creating a shift offer.",
"type": "object",
"properties": {
"outbox_id": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
}
},
"required": [
"outbox_id",
"name"
]
},
"visits": {
"title": "OutboxShiftOfferCreateItemVisitsResponse",
"description": "The `visits` object included in the response when creating a shift offer.",
"type": "array",
"items": {
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"outbox_id": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"outbox_id"
]
}
},
"response_counts": {
"$ref": "#/components/schemas/OfferResponseCountsCore"
}
},
"required": [
"offer",
"client",
"service",
"visits",
"response_counts"
]
}
}
},
"required": [
"shift",
"items"
]
},
"OutboxBundleOfferCreateRequest": {
"type": "object",
"properties": {
"offer": {
"title": "OutboxBundleOfferCreateOfferRequest",
"type": "object",
"properties": {
"expires_at": {
"type": "string",
"format": "date-time"
},
"comment": {
"type": "string"
}
},
"required": [
"expires_at"
]
},
"direct_supply_persona_ids": {
"description": "Identifiers of one (or more) supply organization for direct-to-supplier\nmatching.\n",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"case_manager": {
"$ref": "#/components/schemas/CaseManagerCore"
},
"items": {
"type": "array",
"maxItems": 10,
"items": {
"title": "OutboxBundleOfferCreateItemRequest",
"type": "object",
"properties": {
"care_type": {
"$ref": "#/components/schemas/CareTypeCore"
},
"demand_labels": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"price": {
"$ref": "#/components/schemas/OutboxOfferPriceCore"
},
"client": {
"$ref": "#/components/schemas/OutboxOfferClientRequest"
},
"service": {
"$ref": "#/components/schemas/OutboxServiceRequest"
},
"alayacare": {
"$ref": "#/components/schemas/OutboxAlayaCareCore"
}
},
"required": [
"care_type",
"client",
"service"
]
}
}
},
"required": [
"offer",
"items"
]
},
"OutboxBundleOfferCreateResponse": {
"type": "object",
"properties": {
"bundle": {
"title": "OutboxBundleOfferCreateBundleResponse",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the bundle. Referred to as `shift_id` when retrieving the offer\nin all other contexts.\n"
}
},
"required": [
"id"
]
},
"items": {
"type": "array",
"items": {
"title": "OutboxBundleOfferCreateItemsResponse",
"type": "object",
"properties": {
"offer": {
"title": "OutboxBundleOfferCreateItemOfferResponse",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"care_type": {
"$ref": "#/components/schemas/CareTypeCore"
},
"status": {
"$ref": "#/components/schemas/OfferStatusCore"
},
"start_at": {
"type": "string",
"format": "date-time",
"description": "Derived from the visits"
},
"end_at": {
"type": "string",
"format": "date-time",
"description": "Derived from the visits"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"demand_labels": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"required": [
"id",
"care_type",
"start_at",
"expires_at",
"created_at"
]
},
"client": {
"title": "OutboxBundleOfferCreateItemClientResponse",
"type": "object",
"properties": {
"outbox_id": {
"type": "string",
"minLength": 1
},
"demographics": {
"title": "OutboxBundleOfferCreateItemClientDemographicsResponse",
"type": "object",
"properties": {
"first_name": {
"type": "string",
"minLength": 1
},
"last_name": {
"type": "string",
"minLength": 1
}
},
"required": [
"first_name",
"last_name"
]
}
},
"required": [
"outbox_id",
"demographics"
]
},
"service": {
"title": "OutboxBundleOfferCreateItemServiceResponse",
"type": "object",
"properties": {
"outbox_id": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
}
},
"required": [
"outbox_id",
"name"
]
},
"response_counts": {
"$ref": "#/components/schemas/OfferResponseCountsCore"
}
},
"required": [
"offer",
"client",
"service",
"response_counts"
]
}
}
},
"required": [
"bundle",
"items"
]
},
"OutboxOfferCollectionResponse": {
"description": "API response of an offer on the outbox API.\n",
"type": "object",
"properties": {
"offer": {
"$ref": "#/components/schemas/OutboxOfferExtendedCore"
},
"client": {
"title": "OutboxOfferCollectionClientResponse",
"type": "object",
"properties": {
"outbox_id": {
"type": "string"
},
"demographics": {
"$ref": "#/components/schemas/DemographicLeanCore"
}
},
"required": [
"demographics",
"outbox_id"
]
},
"service": {
"title": "OutboxOfferServiceLeanResponse",
"type": "object",
"properties": {
"outbox_id": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
}
},
"required": [
"name",
"outbox_id"
]
},
"response_counts": {
"$ref": "#/components/schemas/OfferResponseCountsCore"
}
},
"required": [
"offer",
"client",
"service",
"response_counts"
]
},
"OutboxOfferExtendedCore": {
"allOf": [
{
"$ref": "#/components/schemas/OutboxOfferCore"
},
{
"$ref": "#/components/schemas/OfferReasonCodeCore"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"shift_id": {
"type": "string",
"format": "uuid"
},
"status": {
"$ref": "#/components/schemas/OfferStatusCore"
},
"start_at": {
"type": "string",
"format": "date-time",
"description": "Derived from the visits"
},
"end_at": {
"type": "string",
"format": "date-time",
"description": "Derived from the visits"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"status",
"start_at",
"created_at"
]
}
]
},
"OfferResponseCountsCore": {
"type": "object",
"properties": {
"modified_at": {
"type": "string",
"format": "date-time",
"description": "The creation or last update of the offer or any responses to it."
},
"sent": {
"type": "integer",
"minimum": 0,
"description": "The number of recipients to whom the offer was sent."
},
"accepted": {
"type": "integer",
"minimum": 0,
"description": "The number of accepted offers."
},
"declined": {
"type": "integer",
"minimum": 0,
"description": "The number of declined offers."
}
}
},
"OutboxOfferDetailResponse": {
"allOf": [
{
"type": "object",
"properties": {
"offer": {
"$ref": "#/components/schemas/OutboxOfferExtendedCore"
},
"demand": {
"$ref": "#/components/schemas/OrganizationLeanCore"
},
"supply": {
"$ref": "#/components/schemas/OrganizationLeanCore"
},
"alayacare": {
"$ref": "#/components/schemas/OutboxAlayaCareCore"
},
"case_manager": {
"$ref": "#/components/schemas/CaseManagerCore"
},
"direct_supply_persona_ids": {
"description": "Identifiers of one (or more) supply organization for direct-to-supplier\nmatching.\n",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"price": {
"$ref": "#/components/schemas/OutboxOfferPriceCore"
},
"client": {
"$ref": "#/components/schemas/OutboxOfferClientResponse"
},
"service": {
"$ref": "#/components/schemas/OutboxServiceResponse"
},
"visits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutboxOfferVisitResponse"
}
},
"response_counts": {
"$ref": "#/components/schemas/OfferResponseCountsCore"
}
},
"required": [
"offer",
"demand",
"client",
"service",
"response_counts"
]
}
]
},
"OutboxOfferMatchCollectionResponse": {
"description": "API response for the representation of Offer Matches on the outbox API.\n",
"type": "object",
"properties": {
"match": {
"$ref": "#/components/schemas/OfferMatchCore"
},
"supply": {
"$ref": "#/components/schemas/OrganizationLeanCore"
}
}
},
"OutboxOfferPageResponse": {
"allOf": [
{
"$ref": "#/components/schemas/PageCore"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutboxOfferCollectionResponse"
}
}
}
}
]
},
"OutboxOfferMatchPageResponse": {
"allOf": [
{
"$ref": "#/components/schemas/PageCore"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutboxOfferMatchCollectionResponse"
}
}
}
}
]
},
"InboxOfferCollectionResponse": {
"description": "API response for the core representation of an offer response on the inbox API.\n",
"type": "object",
"properties": {
"offer": {
"$ref": "#/components/schemas/InboxOfferCore"
},
"match": {
"$ref": "#/components/schemas/OfferMatchCore"
}
}
},
"InboxReferralCollectionResponse": {
"description": "API response for the core representation of a referral response on the inbox API.\n",
"type": "object",
"properties": {
"referral": {
"title": "InboxReferralCollectionReferralResponse",
"allOf": [
{
"$ref": "#/components/schemas/ReferralReasonCodeCore"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"sequence_id": {
"type": "string",
"format": "uuid"
},
"offer_id": {
"type": "string",
"format": "uuid"
},
"shift_id": {
"type": "string",
"format": "uuid"
},
"care_type": {
"$ref": "#/components/schemas/CareTypeCore"
},
"referral_type": {
"$ref": "#/components/schemas/ReferralTypeCore"
},
"start_at": {
"type": "string",
"format": "date-time"
},
"end_at": {
"type": "string",
"format": "date-time"
},
"status": {
"$ref": "#/components/schemas/ReferralStatusCore"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"care_type",
"referral_type",
"start_at",
"status",
"created_at"
]
}
]
},
"revision": {
"title": "InboxReferralCollectionRevisionResponse",
"type": "object",
"properties": {
"revision_group_id": {
"type": "string",
"format": "uuid"
},
"revision_number": {
"type": "integer",
"minimum": 1
}
},
"required": [
"revision_group_id",
"revision_number"
]
}
},
"required": [
"referral",
"revision"
]
},
"InboxOfferCore": {
"description": "Core representation of an offer on the inbox API.\nMeant to be used in the nested `offer` in a top level (API) response schema.\n",
"allOf": [
{
"$ref": "#/components/schemas/OfferReasonCodeCore"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"shift_id": {
"type": "string",
"format": "uuid"
},
"care_type": {
"$ref": "#/components/schemas/CareTypeCore"
},
"offer_type": {
"$ref": "#/components/schemas/OfferTypeCore"
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"start_at": {
"type": "string",
"format": "date-time"
},
"end_at": {
"type": "string",
"format": "date-time"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"care_type",
"offer_type",
"expires_at",
"start_at",
"created_at"
]
}
]
},
"InboxOfferDetailResponse": {
"description": "API response for the anonymous representation of an offer on the inbox API.\nSimilarly to the `InboxOfferCore`, this schema is meant to be used in the nested `offer`\nin a top level (API) response schema, e.g. the `InboxOfferScalarApiResponse`\nThis includes everything from the `InboxOfferCore` along with some additional information\non the client, service and visits.\nNot all client information is included here, hence the \"anon\" (anonymous) prefix.\n",
"type": "object",
"properties": {
"offer": {
"$ref": "#/components/schemas/InboxOfferCore"
},
"alayacare": {
"$ref": "#/components/schemas/InboxOfferAlayaCareResponse"
},
"case_manager": {
"$ref": "#/components/schemas/CaseManagerCore"
},
"price": {
"$ref": "#/components/schemas/PriceCore"
},
"client": {
"title": "InboxOfferDetailClientResponse",
"type": "object",
"properties": {
"address": {
"$ref": "#/components/schemas/AddressAnonCore"
},
"allergies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AllergyCore"
}
},
"risks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RiskCore"
}
},
"custom_fields": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomFieldCore"
}
}
},
"required": [
"address"
]
},
"service": {
"title": "InboxOfferDetailServiceResponse",
"allOf": [
{
"$ref": "#/components/schemas/ServiceCore"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"use_client_address": {
"type": "boolean"
},
"address": {
"$ref": "#/components/schemas/AddressAnonCore"
}
},
"required": [
"id"
]
}
]
},
"visits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InboxOfferVisitResponse"
}
},
"match": {
"$ref": "#/components/schemas/OfferMatchCore"
},
"demand": {
"$ref": "#/components/schemas/OrganizationLeanCore"
}
},
"required": [
"offer",
"match",
"demand",
"client",
"service"
]
},
"SortByCore": {
"type": "string",
"enum": [
"last_modified"
],
"default": "last_modified"
},
"SortOrderCore": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "desc"
},
"InboxOfferPageResponse": {
"allOf": [
{
"$ref": "#/components/schemas/PageCore"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InboxOfferCollectionResponse"
}
}
},
"required": [
"items"
]
}
]
},
"OfferMatchCore": {
"description": "Core representation of an Offer Match.\nMeant to be used in the nested `match` in a top level (API) response schema.\n",
"allOf": [
{
"$ref": "#/components/schemas/OfferMatchReasonCodeCore"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"response": {
"$ref": "#/components/schemas/OfferMatchResponseCore"
},
"status": {
"$ref": "#/components/schemas/OfferMatchStatusCore"
},
"sequence_id": {
"type": "string",
"format": "uuid"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"response",
"status",
"sequence_id",
"created_at"
]
}
]
},
"OutboxOfferCloseRequest": {
"allOf": [
{
"$ref": "#/components/schemas/OfferReasonCodeCore"
}
]
},
"OfferReasonCodeCore": {
"description": "`reason_code` and `reason_comment` associated to a cancelled or closed offer.\n",
"type": "object",
"properties": {
"reason_code": {
"type": "string",
"enum": [
"datetime_change",
"client_request",
"client_hospitalization",
"client_passed_away",
"client_refused_service",
"processing_error",
"other"
]
},
"reason_comment": {
"type": "string"
}
}
},
"OfferMatchReasonCodeCore": {
"description": "`reason_code` associated with a declined Offer Match.\n",
"type": "object",
"properties": {
"reason_code": {
"type": "string"
},
"comment": {
"type": "string"
}
}
# --- truncated at 32 KB (162 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/api-evangelist-alayacare/refs/heads/main/json-schema/alayacare-market-schema.json