AlayaCare offer outbox bundle API
The offer outbox bundle API from AlayaCare — 2 operation(s) for offer outbox bundle.
The offer outbox bundle API from AlayaCare — 2 operation(s) for offer outbox bundle.
openapi: 3.0.0
info:
version: 1.0.19-oas3
title: AlayaCare Accounting Accounts offer outbox bundle API
description: '**AlayaCare IDs:**
The following terms are used to reference IDs that identify resources in AlayaCare:
- id
- visit_id
- premium_id
- visit_premium_id
- employee_id
- cost_centre_id
- client_id
**External IDs**
The following terms are used to reference IDs that identify resources systems external to AlayaCare:
- employee_external_id
- client_external_id
External IDs are required to be unique.
No other assumptions are made regarding their format they are treated as strings.
'
servers:
- url: https://example.alayacare.com/ext/api/v2/accounting
security:
- basic_auth: []
tags:
- name: offer outbox bundle
paths:
/v1/outbox/bundle/offers:
post:
tags:
- offer outbox bundle
description: '# Authorization
Required role: `org_admin`
# Description
Create a Bundle Offer by the Demand organization.
This will generate multiple offers with type: `service` linked with a common
`bundle_id`.
'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OutboxBundleOfferCreateRequest'
responses:
201:
description: Successfully created offer bundle.
content:
application/json:
schema:
$ref: '#/components/schemas/OutboxBundleOfferCreateResponse'
x-amazon-apigateway-integration:
uri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${OfferApiFunctionV2.Arn}:live/invocations
httpMethod: POST
passthroughBehavior: when_no_match
type: aws_proxy
/v1/outbox/shift/offers:
post:
tags:
- offer outbox bundle
description: "# Authorization\nRequired role: `org_admin`\n\n# Description\nCreate a Shift Offer by the Demand organization. \nThis will generate multiple offers with type: `visit` linked with a common `shift_id`. \nMultiple open or assigned offers with offer_type: `visit` are not permitted for the same visit. This is to prevent conflicting acceptances and assignations.\n"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OutboxShiftOfferCreateRequest'
responses:
201:
description: Successfully created Offer
content:
application/json:
schema:
$ref: '#/components/schemas/OutboxShiftOfferCreateResponse'
x-amazon-apigateway-integration:
uri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${OfferApiFunctionV2.Arn}:live/invocations
httpMethod: POST
passthroughBehavior: when_no_match
type: aws_proxy
components:
schemas:
OfferStatusCore:
type: string
enum:
- open
- assigned
- closed
- declined_by_all
- expired
CarePlanGoalCore:
type: object
properties:
description:
type: string
end_date:
type: string
format: date
is_from_library:
type: boolean
is_primary:
type: boolean
last_updated_progress:
title: GoalLastUpdatedProgressCore
type: object
properties:
comment:
type: string
percentage:
type: integer
completed:
type: boolean
name:
type: string
progress_type:
type: string
rank:
type: integer
start_date:
type: string
format: date
status:
type: string
type:
type: string
updated_at:
type: string
format: date-time
required:
- name
- start_date
- is_primary
- type
- progress_type
CaseManagerCore:
type: object
properties:
name:
type: string
phone_number:
type: string
fax_number:
type: string
email:
type: string
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
OutboxCarePlanInterventionCore:
allOf:
- $ref: '#/components/schemas/CarePlanInterventionCore'
- type: object
properties:
goals:
type: array
items:
title: OutboxCarePlanInterventionGoalCore
type: object
properties:
outbox_id:
type: integer
name:
type: string
required:
- outbox_id
- name
outbox_id:
type: integer
required:
- outbox_id
CarePlanDiagnosisCore:
type: object
properties:
description:
type: string
end_date:
type: string
format: date
is_from_library:
type: boolean
is_primary:
type: boolean
name:
type: string
rank:
type: integer
start_date:
type: string
format: date
status:
type: string
updated_at:
type: string
format: date-time
required:
- name
- start_date
- is_primary
OutboxOfferClientRequest:
allOf:
- $ref: '#/components/schemas/ClientCore'
- type: object
properties:
outbox_id:
type: string
minLength: 1
referral_only_custom_fields:
type: array
items:
$ref: '#/components/schemas/CustomFieldCore'
required:
- outbox_id
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
AddressCore:
type: object
properties:
name:
type: string
address:
type: string
minLength: 1
address_suite:
type: string
city:
type: string
minLength: 1
state:
type: string
minLength: 1
zip:
type: string
minLength: 1
country:
type: string
minLength: 1
latitude:
type: number
format: double
minimum: -90
maximum: 90
longitude:
type: number
format: double
minimum: -180
maximum: 180
required:
- address
- city
- state
- zip
- country
PriceCore:
type: object
properties:
rate:
type: number
format: decimal
description: The dollar amount for offer per unit.
example: 30.0
unit:
type: string
description: The unit for the rate.
enum:
- per_visit
- per_hour
- amount
required:
- rate
- unit
OutboxOfferPriceCore:
type: object
properties:
default:
$ref: '#/components/schemas/PriceCore'
custom:
type: array
items:
allOf:
- $ref: '#/components/schemas/PriceCore'
- type: object
properties:
supply_persona_id:
type: string
format: uuid
required:
- supply_persona_id
required:
- default
AuthorizationCore:
type: object
properties:
authorization_number:
type: string
authorization_status:
type: string
end_date:
type: string
format: date
first_day_of_week:
type: integer
id:
type: integer
import_id:
type: string
member_number:
type: string
notes:
type: string
program_id:
type: string
custom_number_of_days:
type: integer
rule_type:
type: string
rule_custom:
type: number
format: decimal
rule_daily:
type: number
format: decimal
rule_weekly:
type: number
format: decimal
rule_monthly:
type: number
format: decimal
rule_period:
type: number
format: decimal
rule_monday:
type: number
format: decimal
rule_tuesday:
type: number
format: decimal
rule_wednesday:
type: number
format: decimal
rule_thursday:
type: number
format: decimal
rule_friday:
type: number
format: decimal
rule_saturday:
type: number
format: decimal
rule_sunday:
type: number
format: decimal
start_date:
type: string
format: date
required:
- authorization_status
- first_day_of_week
- rule_type
- start_date
FormTemplateFieldCore:
type: object
properties:
field_tag:
type: string
field_type:
type: string
id:
type: integer
instructions:
type: string
json_logic:
type: object
label:
type: string
parent_id:
type: integer
rank:
type: integer
required:
type: boolean
settings:
type: object
required:
- field_type
- id
- label
- parent_id
- rank
- required
ClientCore:
type: object
properties:
address:
$ref: '#/components/schemas/AddressCore'
contacts:
type: array
items:
type: object
properties:
id:
type: string
first_name:
type: string
last_name:
type: string
address:
type: object
properties:
city:
type: string
state:
type: string
zip:
type: string
country:
type: string
name:
type: string
address:
type: string
address_suite:
type: string
latitude:
type: number
format: double
minimum: -90
maximum: 90
longitude:
type: number
format: double
minimum: -180
maximum: 180
contact_type:
type: string
email:
type: string
format: email
is_active:
type: boolean
default: true
is_emergency:
type: boolean
phone_number:
description: Main phone number.
type: string
phone_other:
type: string
phone_personal:
type: string
language:
type: string
relationship:
type: string
demographics:
type: object
properties:
first_name:
type: string
minLength: 1
last_name:
type: string
minLength: 1
email:
type: string
format: email
phone_number:
description: Main phone number.
type: string
phone_other:
type: string
phone_personal:
type: string
date_of_birth:
type: string
format: date
gender:
type: string
language:
type: string
required:
- first_name
- last_name
allergies:
type: array
items:
$ref: '#/components/schemas/AllergyCore'
risks:
type: array
items:
$ref: '#/components/schemas/RiskCore'
diagnoses:
type: array
items:
type: object
properties:
name:
type: string
description:
type: string
is_primary:
type: boolean
start_date:
type: string
format: date
end_date:
type: string
format: date
treatment:
type: string
surgeries:
type: array
items:
type: object
properties:
name:
type: string
description:
type: string
details:
type: string
start_date:
type: string
format: date
end_date:
type: string
format: date
custom_fields:
type: array
items:
$ref: '#/components/schemas/CustomFieldCore'
required:
- demographics
- address
CareTypeCore:
type: string
enum:
- psw
- nursing
AllergyCore:
type: object
properties:
name:
type: string
category:
type: string
severity:
type: string
start_date:
type: string
format: date
treatment:
type: string
OutboxFormTemplateCore:
allOf:
- $ref: '#/components/schemas/FormTemplateCore'
- type: object
properties:
fields:
type: array
items:
$ref: '#/components/schemas/FormTemplateFieldCore'
RiskCore:
type: object
properties:
name:
type: string
category:
type: string
example: allergy
severity:
type: integer
start_date:
type: string
format: date
ServiceCore:
type: object
properties:
name:
type: string
minLength: 1
start_at:
type: string
format: date-time
expected_start_at:
type: string
format: date-time
end_at:
type: string
format: date-time
instructions:
type: string
notes:
type: string
skills:
type: array
items:
type: string
custom_fields:
type: array
items:
$ref: '#/components/schemas/CustomFieldCore'
required:
- name
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
matching.
'
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
in all other contexts.
'
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
OutboxOfferVisitRequest:
type: object
properties:
outbox_id:
type: string
minLength: 1
start_at:
type: string
format: date-time
end_at:
type: string
format: date-time
instructions:
type: string
tasks:
type: array
items:
$ref: '#/components/schemas/OutboxOfferVisitTaskRequest'
required:
- outbox_id
- start_at
- end_at
CustomFieldCore:
type: object
properties:
name:
type: string
type:
type: string
value:
type: string
required:
- name
- value
OutboxCarePlanCore:
type: object
properties:
outbox_id:
type: integer
name:
type: string
start_date:
type: string
format: date
end_date:
type: string
format: date
status:
type: string
diagnoses:
type: array
items:
$ref: '#/components/schemas/OutboxCarePlanDiagnosisCore'
goals:
type: array
items:
$ref: '#/components/schemas/OutboxCarePlanGoalCore'
interventions:
type: array
items:
$ref: '#/components/schemas/OutboxCarePlanInterventionCore'
updated_at:
type: string
format: date-time
required:
- name
- outbox_id
- start_date
CarePlanInterventionCore:
type: object
properties:
description:
type: string
end_date:
type: string
format: date
external_link:
title: CarePlanInterventionExternalLinkCore
type: object
properties:
label:
type: string
url:
type: string
required:
- label
- url
has_duration:
type: boolean
is_from_library:
type: boolean
is_required:
type: boolean
name:
type: string
rank:
type: integer
recurrence:
title: CarePlanInterventionRecurrenceCore
type: object
properties:
count:
type: integer
frequency:
type: string
interval:
type: integer
weekdays:
type: array
items:
type: string
monthday:
type: integer
available_from:
type: string
available_to:
type: string
required:
- frequency
- interval
recurrence_type:
type: string
start_date:
type: string
format: date
status:
type: string
timezone:
type: string
type:
type: string
updated_at:
type: string
format: date-time
required:
- has_duration
- is_required
- name
- rank
- recurrence_type
- start_date
- status
- type
OutboxAlayaCareCore:
type: object
properties:
authorizations:
type: array
items:
$ref: '#/components/schemas/AuthorizationCore'
care_plan:
$ref: '#/components/schemas/OutboxCarePlanCore'
form_templates:
type: array
items:
$ref: '#/components/schemas/OutboxFormTemplateCore'
OutboxOfferVisitTaskRequest:
type: object
properties:
outbox_id:
type: string
minLength: 1
name:
type: string
minLength: 1
description:
type: string
is_required:
type: boolean
required:
- outbox_id
- name
- is_required
OutboxCarePlanGoalCore:
allOf:
- $ref: '#/components/schemas/CarePlanGoalCore'
- type: object
properties:
outbox_id:
type: integer
diagnoses:
type: array
items:
title: OutboxCarePlanGoalDiagnosisCore
type: object
properties:
outbox_id:
type: integer
name:
type: string
required:
- outbox_id
- name
required:
- outbox_id
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.
OutboxServiceRequest:
allOf:
- $ref: '#/components/schemas/ServiceCore'
- type: object
properties:
outbox_id:
type: string
minLength: 1
use_client_address:
type: boolean
description: 'For informational purposes only. This is an explicit indicator to the
supply organization whether the client address should be used as the
service address.
Setting to `true` means the client address should be used for the
service address. So, if a service address is also provided in the
request, it can safely be ignored.
Not providing this or setting to `false` means the specified
service address should be used instead.
'
address:
$ref: '#/components/schemas/AddressCore'
referral_only_custom_fields:
type: array
items:
$ref: '#/components/schemas/CustomFieldCore'
required:
- outbox_id
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
OutboxCarePlanDiagnosisCore:
allOf:
- $ref: '#/components/schemas/CarePlanDiagnosisCore'
- type: object
properties:
outbox_id:
type: integer
required:
- outbox_id
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
matching.
'
type: array
items:
type: string
format: uuid
case_manager:
$ref: '#/components/schemas/CaseManagerCore'
items:
type: array
items:
$ref: '#/components/schemas/OutboxShiftOfferItem'
required:
- offer
- items
FormTemplateCore:
type: object
properties:
admin_eyes_only:
type: boolean
approve_automatically:
type: boolean
clinical_event_name:
type: string
display_instructions_in_pdf:
type: boolean
display_report:
type: boolean
exclude_from_shift_report:
type: boolean
form_type:
type: string
id:
# --- truncated at 32 KB (32 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/api-evangelist-alayacare/refs/heads/main/openapi/alayacare-offer-outbox-bundle-api-openapi.yml