To join the AlayaCare Marketplace as a demand or supply participant, contact your AlayaCare Customer Success Manager or contact us on team-alayamarket@alayacare.com.
Once you’re signed up as a participant, you’ll be able to use your account credentials to access our APIs.
The Marketplace server domain name will depend on your environment and region:
The examples below will refer to the server for your environment and region as $SERVER.
Below you’ll find some examples of how to use our APIs. These examples use a tool called httpie to perform http requests.
brew install httpie
To login you will need the username
and password
account credentials
provided during sign up.
http POST $SERVER/auth/v1/login username=<username> password=<password>
The response will contain an IdToken
that will be used for subsequent requests.
HTTP requests are authenticated using token authentication.
To authenticate a http request, include an Authorization
header referencing the
IdToken
returned during login:
Authorization:<IdToken>
As a demand participant, you will use the Outbox
APIs to create and manage your offers.
You can see the offers that you have created from the Offers Outbox:
http GET $SERVER/offers/v1/outbox/offers Authorization:<IdToken>
As a supply participant, you will use the Inbox
APIs to receive and respond to your offers.
You can see the offers that you have been matched with
from the Offers Inbox:
http GET $SERVER/offers/v1/inbox/offers Authorization:<IdToken>
For the complete HTTP API specifications, see Documentation.
Rather than polling our APIs, you can subscribe to our events to be alerted when something changes. For more details, see Documentation.
As a demand participant, you will use the Outbox
topics to receive events like an offer was accepted or declined, see e.g here.
As a supply participant, you will use the Inbox
topics to receive events like an offer was matched or closed, see e.g here.
offer
: An offer to provide care to a client. This is created by an organization in demand of staff that cannot provide care themselves. The offer may be matched to multiple organizations that can supply their staff to provide the care.referral
: An agreement to provide care to a client. This is automatically created when a demand organization assigns an offer to a supply organization.visit
: A scheduled time for care to be provided.service
: A time period over which care will be provided. This can involve many visits.work_session
: A record of the time that care was provided.outbox
: Used by demand organizations to create, view and manage offers, referrals, etc.inbox
: Used by supply organizations to view, accept and decline offers, view and manage referrals, etc.sys_admin
: Used by internal system administrators to configure settings.care_type
: Describes the type of care that will be provided, e.g. nursing
will require that a nurse completes the care. Offers are matched to suppliers based on the care they can provide.offer_type
: Describes the type of offer that will be provided, e.g. visit
indicates that care is required for a single visit at a specified time, whereas service
indicates that care is to be provided as requiredwithin a given time period.The Marketplace exposes HTTP APIs to manage authentication, organization settings, and offers and referrals:
The Marketplace supports event driven communication using Async APIs to notify you of relevant changes, such as when an offer is matched or accepted.
We do not support self-serve subscribing. Please reach out to us on team-alayamarket@alayacare.com with the endpoints or email addresses you would like to subscribe.
Notifications are delivered using AWS SNS. You will need to confirm your subscriptions before they become active.
For email subscriptions, you will receive an email containing a link that must be clicked to confirm your subscription.
For http subscriptions, you will receive a confirmation event
containing a SubscribeURL
that you will need to perform a GET request on.
Subscription events have a payload containing
"Type" : "SubscriptionConfirmation"
. For more information, see here.
Once your endpoints are confirmed, you can start to receive notification events.
These events have a payload containing "Type" : "Notification"
and a "Message"
containing the data described in the Async API specs. For more information, see here.