Download OpenAPI specification:
The Core Platform Edge API is organized around REST and follows the
JSON:API specification. It has predictable,
resource-oriented URLs, accepts and returns application/vnd.api+json
payloads, and uses standard HTTP verbs, response codes, and authentication.
Raw document bytes may alternatively be sent as multipart/form-data — see
POST /api/upload_document.
You can use the Edge API in a sandbox without affecting live data. The bearer token you authenticate with determines whether a request runs against the live environment or a sandbox; the two are fully isolated. See the Authentication section below.
The Edge API's synchronous endpoints each act on a single resource. Batch
submission from an object-storage bucket is described under
POST /api/requests/batch (not yet implemented).
The Edge API authenticates every request with a bearer token sent in the
Authorization header:
Authorization: Bearer cp_live_9c8b7a6d5e4f3g2h1i0j
Each token belongs to a single environment (see the table below). Treat a token like a password: never embed it in client-side code, browser requests, or a public repository. If a token leaks, revoke it and issue a new one.
curl https://{organisation}.core-platform.dyad.net/api/requests \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Accept: application/vnd.api+json"
All request and response bodies use the JSON:API media type
application/vnd.api+json.
Every base URL is organisation-scoped: replace {organisation} with your
organisation identifier, issued during onboarding. A request is served only for
the organisation in its host, and the bearer token must belong to that same
organisation.
| Environment | Base URL | Token prefix |
|---|---|---|
| Production | https://{organisation}.core-platform.dyad.net |
cp_live_ |
| Sandbox | https://{organisation}.sandbox.core-platform.dyad.net |
cp_test_ |
Note — the sandbox does not yet enforce token verification: any non-empty bearer token is currently accepted. This is temporary. Do not build against it — production rejects invalid tokens.
The API description documents are public:
GET /api/open_api — the OpenAPI documentGET /api/swaggerui — Swagger UIGET /api/redoc — ReDocA missing, malformed, or rejected token returns 401 Unauthorized with a
JSON:API error document:
{
"errors": [
{
"status": "401",
"title": "Unauthorized",
"detail": "A valid bearer token is required"
}
]
}
| Situation | Status |
|---|---|
No Authorization header |
401 |
Header is not in Bearer <token> form |
401 |
| Token is rejected by verification | 401 |
Submit a document for processing. The file is sent as a base64 string in
data.attributes.document, data.attributes.request.entities selects what to extract from it, and the
optional data.attributes.request.format selects how results are serialised
(json or fhir).
This is a stateless submit-and-respond operation: nothing is persisted, and the
outcome is delivered through the event emitted to the orchestrator (see
GET /api/requests/{id}). For raw file bytes instead of base64, use
POST /api/upload_document.
curl -X POST https://{organisation}.core-platform.dyad.net/api/requests \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "request",
"attributes": {
"document": "JVBERi0xLjQKJUVPRg==",
"request": { "entities": ["slots"] }
}
}
}'
Example response — 201 Created
{
"data": {
"attributes": {
"document": "JVBERi0xLjQKJUVPRg==",
"request": {
"entities": [
"slots"
],
"format": "json"
}
},
"id": "1f0a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
"type": "request"
}
}
| include | string^()(,())*$ Relationship paths to include in the response |
object Example: fields[request]=id,document,request Limits the response fields to only those listed for each type |
Request body for the /requests operation on request resource
required | object |
{- "data": {
- "attributes": {
- "document": "JVBERi0xLjQKJUVPRg==",
- "request": {
- "entities": [
- "slots"
], - "format": "json"
}
}, - "type": "request"
}
}{- "data": {
- "attributes": {
- "document": "JVBERi0xLjQKJUVPRg==",
- "request": {
- "entities": [
- "slots"
], - "format": "json"
}
}, - "id": "1f0a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
- "type": "request"
}
}Work in progress
Submit raw text for processing instead of a document. The text is sent in data.attributes.text; data.attributes.request is identical to POST /api/requests — entities, plus the optional format. Processing, the event emitted to the orchestrator, and result retrieval via GET /api/requests/{id} are the same as for a document submission.
Until this is available the endpoint responds 404 Not Found.
curl -X POST https://{organisation}.core-platform.dyad.net/api/requests/text \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "request",
"attributes": {
"text": "Patient: Jane Doe. Clinic date: 17 Feb 2023.",
"request": { "entities": ["slots"], "format": "json" }
}
}
}'
Example response — 201 Created
{
"data": {
"attributes": {
"request": {
"entities": [
"slots"
],
"format": "json"
},
"text": "Patient: Jane Doe. Clinic date: 17 Feb 2023."
},
"id": "1f0a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
"type": "request"
}
}
| include | string^()(,())*$ Relationship paths to include in the response |
object Example: fields[request]=id,document,request Limits the response fields to only those listed for each type |
Request body for the /requests/text operation on request resource
required | object |
{- "data": {
- "attributes": {
- "request": {
- "entities": [
- "slots"
], - "format": "json"
}, - "text": "Patient: Jane Doe. Clinic date: 17 Feb 2023."
}, - "type": "request"
}
}{- "data": {
- "attributes": {
- "request": {
- "entities": [
- "slots"
], - "format": "json"
}, - "text": "Patient: Jane Doe. Clinic date: 17 Feb 2023."
}, - "id": "1f0a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
- "type": "request"
}
}Work in progress The response body for this endpoint is not finalised: the schema shown here is a placeholder and will change.
Once available, GET /api/requests/{id} will return the current state of the
request identified by id — either its processing status (for example
processing, succeeded, failed) while work is still in progress, or the
extracted results once they are ready. The exact result shape is still being
defined and depends on the entities and format requested at submission
time; with format: fhir the results are returned as an HL7 FHIR R4 Bundle.
The id may come from POST /api/requests, POST /api/upload_document,
POST /api/requests/text, or a document within a batch.
Until then this endpoint responds 404 Not Found for every id.
curl https://{organisation}.core-platform.dyad.net/api/requests/3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40 \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Accept: application/vnd.api+json"
Example response — still processing
{
"data": {
"attributes": {
"status": "processing"
},
"id": "3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40",
"type": "request"
}
}
Example response — processed (2 slots shown)
{
"data": {
"attributes": {
"results": {
"slots": [
{
"bboxes": [
{
"height": 0.009692132269099207,
"left_x": 0.5042355788624445,
"page_index": 1,
"top_y": 0.2913340935005701,
"width": 0.06696248487293266
},
{
"height": 0.009692132269099207,
"left_x": 0.7301331181928197,
"page_index": 1,
"top_y": 0.2913340935005701,
"width": 0.021379588543767647
}
],
"concept_id": null,
"date": null,
"entity_type": null,
"explanation": "AI predicted slot value",
"extra_info": null,
"laterality": null,
"problem_resolution_status": null,
"restriction_name": null,
"slot_id": "97b16e36-f647-4f19-bcec-7daac8a29b90",
"snomed_code": null,
"snomed_term": null,
"table": "requests_tasks",
"text": "Referrals No",
"units": null,
"value": null
},
{
"bboxes": [
{
"height": 0.009407069555302166,
"left_x": 0.2779346510689794,
"page_index": 0,
"top_y": 0.515678449258837,
"width": 0.06655909640984267
}
],
"concept_id": "9663501000001101",
"date": "2026-09-04",
"entity_type": "medication",
"explanation": "AI predicted slot value",
"extra_info": null,
"laterality": null,
"problem_resolution_status": null,
"restriction_name": null,
"slot_id": "59a05416-e091-4f66-8ef8-dd12a18d2130",
"snomed_code": "9663501000001101",
"snomed_term": "Entonox",
"table": "medication",
"text": "Entonox",
"units": null,
"value": false
}
]
},
"status": "succeeded"
},
"id": "3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40",
"type": "request"
}
}
| id required | string |
| include | string^()(,())*$ Relationship paths to include in the response |
object Example: fields[request]=id,document,request Limits the response fields to only those listed for each type |
Processing finished. attributes.results.slots holds the extracted slots.
{- "data": {
- "attributes": {
- "results": {
- "slots": [
- {
- "bboxes": [
- {
- "height": 0.009692132269099207,
- "left_x": 0.5042355788624445,
- "page_index": 1,
- "top_y": 0.2913340935005701,
- "width": 0.06696248487293266
}, - {
- "height": 0.009692132269099207,
- "left_x": 0.7301331181928197,
- "page_index": 1,
- "top_y": 0.2913340935005701,
- "width": 0.021379588543767647
}
], - "concept_id": null,
- "date": null,
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "97b16e36-f647-4f19-bcec-7daac8a29b90",
- "snomed_code": null,
- "snomed_term": null,
- "table": "requests_tasks",
- "text": "Referrals No",
- "units": null,
- "value": null
}, - {
- "bboxes": [
- {
- "height": 0.009407069555302166,
- "left_x": 0.2779346510689794,
- "page_index": 0,
- "top_y": 0.515678449258837,
- "width": 0.06655909640984267
}
], - "concept_id": "9663501000001101",
- "date": "2026-09-04",
- "entity_type": "medication",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "59a05416-e091-4f66-8ef8-dd12a18d2130",
- "snomed_code": "9663501000001101",
- "snomed_term": "Entonox",
- "table": "medication",
- "text": "Entonox",
- "units": null,
- "value": false
}, - {
- "bboxes": [
- {
- "height": 0.009407069555302183,
- "left_x": 0.7293263412666398,
- "page_index": 0,
- "top_y": 0.1750285062713797,
- "width": 0.028237192416296963
}, - {
- "height": 0.009692132269099207,
- "left_x": 0.7620008067769262,
- "page_index": 0,
- "top_y": 0.17474344355758267,
- "width": 0.028237192416296963
}, - {
- "height": 0.009407069555302183,
- "left_x": 0.7950786607503025,
- "page_index": 0,
- "top_y": 0.1750285062713797,
- "width": 0.03751512706736593
}
], - "concept_id": null,
- "date": null,
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": {
- "total_nhs_numbers": 1
}, - "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "3b103c0b-c771-403d-9383-17b195f09fb0",
- "snomed_code": null,
- "snomed_term": null,
- "table": "nhs_number",
- "text": "416 845 2646",
- "units": null,
- "value": null
}, - {
- "bboxes": [ ],
- "concept_id": null,
- "date": "1994-07-19",
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "21e73bc8-d721-4714-9e75-177e6c7135de",
- "snomed_code": null,
- "snomed_term": null,
- "table": "patient_dob",
- "text": "19 Jul 1994",
- "units": null,
- "value": null
}, - {
- "bboxes": [
- {
- "height": 0.008551881413911055,
- "left_x": 0.8019362646228317,
- "page_index": 0,
- "top_y": 0.05102622576966933,
- "width": 0.030657523194836722
}, - {
- "height": 0.0068415051311288486,
- "left_x": 0.836224283985478,
- "page_index": 0,
- "top_y": 0.05102622576966933,
- "width": 0.04961678096006461
}, - {
- "height": 0.007981755986316993,
- "left_x": 0.8898749495764421,
- "page_index": 0,
- "top_y": 0.05131128848346636,
- "width": 0.05042355788624453
}, - {
- "height": 0.005131128848346635,
- "left_x": 0.9043969342476805,
- "page_index": 0,
- "top_y": 0.05986316989737742,
- "width": 0.01573215006050821
}, - {
- "height": 0.004846066134549597,
- "left_x": 0.9221460266236385,
- "page_index": 0,
- "top_y": 0.06014823261117446,
- "width": 0.01855586930213804
}
], - "concept_id": null,
- "date": null,
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "42db8e52-a48b-4f39-aa4d-b145d0a3d745",
- "snomed_code": null,
- "snomed_term": null,
- "table": "letter_organisation",
- "text": "Royal Cornwall Hospitals NHS Trust",
- "units": null,
- "value": null
}, - {
- "bboxes": [
- {
- "height": 0.008836944127708095,
- "left_x": 0.763614360629286,
- "page_index": 0,
- "top_y": 0.01225769669327252,
- "width": 0.06292860024203306
}, - {
- "height": 0.008836944127708095,
- "left_x": 0.8309802339653086,
- "page_index": 0,
- "top_y": 0.01225769669327252,
- "width": 0.05244050020169422
}
], - "concept_id": null,
- "date": null,
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "f82e3f33-6d57-4984-866e-1814d7a8d205",
- "snomed_code": null,
- "snomed_term": null,
- "table": "patient_name",
- "text": "Jane Doe",
- "units": null,
- "value": null
}, - {
- "bboxes": [
- {
- "height": 0.009692132269099207,
- "left_x": 0.2779346510689794,
- "page_index": 0,
- "top_y": 0.21436716077537057,
- "width": 0.03912868091972571
}, - {
- "height": 0.009692132269099207,
- "left_x": 0.3227107704719645,
- "page_index": 0,
- "top_y": 0.21436716077537057,
- "width": 0.03025413473174665
}
], - "concept_id": null,
- "date": null,
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "87612d5c-40d1-4453-bc3d-9d490e3285a5",
- "snomed_code": null,
- "snomed_term": null,
- "table": "patient_postcode",
- "text": "PL23 1EL",
- "units": null,
- "value": null
}, - {
- "bboxes": [ ],
- "concept_id": null,
- "date": "2026-09-04",
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "451160df-899a-4ef4-9fbc-a48dc55aea64",
- "snomed_code": null,
- "snomed_term": null,
- "table": "letter_date",
- "text": "04 Sep 2026",
- "units": null,
- "value": null
}, - {
- "bboxes": [ ],
- "concept_id": null,
- "date": "2026-09-04",
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "d8ea01a7-2cc1-4c5a-811d-0332bd8446ff",
- "snomed_code": null,
- "snomed_term": null,
- "table": "letter_clinic_date",
- "text": "04 Sep 2026",
- "units": null,
- "value": null
}, - {
- "bboxes": [
- {
- "height": 0.009407069555302128,
- "left_x": 0.36264622831787013,
- "page_index": 0,
- "top_y": 0.6393956670467503,
- "width": 0.09358612343686967
}
], - "concept_id": null,
- "date": null,
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "1df959e8-12ac-45de-9203-f1d9a8cd3f7d",
- "snomed_code": null,
- "snomed_term": null,
- "table": "department_selector",
- "text": "Neonatal",
- "units": null,
- "value": null
}, - {
- "bboxes": [ ],
- "concept_id": null,
- "date": null,
- "entity_type": null,
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "7ae6bcc7-1d49-4d25-8c54-201a8954724c",
- "snomed_code": null,
- "snomed_term": null,
- "table": "letter_type",
- "text": "Discharge Summary",
- "units": null,
- "value": null
}, - {
- "bboxes": [
- {
- "height": 0.009407069555302166,
- "left_x": 0.05163372327551432,
- "page_index": 1,
- "top_y": 0.21066134549600912,
- "width": 0.021379588543767647
}
], - "concept_id": "163020007",
- "date": "2026-09-04",
- "entity_type": "encounter_summary",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "875d73f1f85f53ed301375dd2ce1a2c1801dac30caf5dd7ea524434c301f0853",
- "snomed_code": "163020007",
- "snomed_term": "O/E - blood pressure reading",
- "table": null,
- "text": "BP",
- "units": "mmHg",
- "value": "120/80"
}, - {
- "bboxes": [
- {
- "height": 0.009692132269099202,
- "left_x": 0.7301331181928197,
- "page_index": 1,
- "top_y": 0.22862029646522236,
- "width": 0.0645421540943929
}, - {
- "height": 0.009692132269099202,
- "left_x": 0.7991125453812021,
- "page_index": 1,
- "top_y": 0.22862029646522236,
- "width": 0.05405405405405406
}
], - "concept_id": "210484005",
- "date": "2026-09-04",
- "entity_type": "diagnosis",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "462e7a1b4399f018cac7ffc4e9adc83c891d2ae93e79de88e64e286d579067b2",
- "snomed_code": "210484005",
- "snomed_term": "Open wound of perineum",
- "table": null,
- "text": "Perineal wound",
- "units": null,
- "value": false
}, - {
- "bboxes": [
- {
- "height": 0.009692132269099202,
- "left_x": 0.05163372327551432,
- "page_index": 1,
- "top_y": 0.17474344355758267,
- "width": 0.041145623235175476
}
], - "concept_id": "364075005",
- "date": "2026-09-04",
- "entity_type": "encounter_summary",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "0003a42b80ef02b9a39566597ad429888fd926fa797dde92e932bb4b061393bd",
- "snomed_code": "364075005",
- "snomed_term": "Heart rate",
- "table": null,
- "text": "Pulse",
- "units": "/min",
- "value": "90"
}, - {
- "bboxes": [
- {
- "height": 0.009977194982896237,
- "left_x": 0.27753126260588945,
- "page_index": 1,
- "top_y": 0.4267388825541619,
- "width": 0.0927793465106898
}, - {
- "height": 0.009122006841505131,
- "left_x": 0.3751512706736587,
- "page_index": 1,
- "top_y": 0.42702394526795895,
- "width": 0.00927793465106898
}, - {
- "height": 0.011972633979475485,
- "left_x": 0.38967325534489716,
- "page_index": 1,
- "top_y": 0.42702394526795895,
- "width": 0.0391286809197257
}, - {
- "height": 0.011687571265678449,
- "left_x": 0.4332392093586123,
- "page_index": 1,
- "top_y": 0.42702394526795895,
- "width": 0.04679306171843485
}
], - "concept_id": "4365001",
- "date": "2026-09-04",
- "entity_type": "procedure",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "4a2742973d0785f759eae16785fea68b9896bfeed3506843e1ca6daff939f6af",
- "snomed_code": "4365001",
- "snomed_term": "Surgical repair",
- "table": null,
- "text": "Continuous 2 layer repair: continuous 2 layer repair",
- "units": null,
- "value": false
}, - {
- "bboxes": [
- {
- "height": 0.009692132269099202,
- "left_x": 0.5038321903993546,
- "page_index": 0,
- "top_y": 0.24686431014823262,
- "width": 0.029043969342476807
}
], - "concept_id": "60621009",
- "date": "2026-09-04",
- "entity_type": "encounter_summary",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "f795d682f74cc4b600c706a06672d59e5c07d8c81e2376586f5a0d7ce25ad636",
- "snomed_code": "60621009",
- "snomed_term": "Body mass index",
- "table": null,
- "text": "BMI",
- "units": "kg/m^2",
- "value": "34.9277"
}, - {
- "bboxes": [
- {
- "height": 0.011972633979475485,
- "left_x": 0.050423557886244454,
- "page_index": 1,
- "top_y": 0.15678449258836943,
- "width": 0.09640984267849939
}
], - "concept_id": "703421000",
- "date": "2026-09-04",
- "entity_type": "encounter_summary",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": "Temperature",
- "slot_id": "1dd8a1105dd77af3a735deaa73a5c567ab3cb3b3efbb2a4f9ad80dcb91dd22ea",
- "snomed_code": "703421000",
- "snomed_term": "Temperature",
- "table": null,
- "text": null,
- "units": "°C",
- "value": "36.8"
}, - {
- "bboxes": [
- {
- "height": 0.009692132269099202,
- "left_x": 0.8233158531665994,
- "page_index": 1,
- "top_y": 0.3272519954389966,
- "width": 0.04356595401371521
}
], - "concept_id": "719410009",
- "date": "2026-09-04",
- "entity_type": "encounter_status",
- "explanation": "AI predicted slot value",
- "extra_info": null,
- "laterality": null,
- "problem_resolution_status": null,
- "restriction_name": null,
- "slot_id": "09dd07a027d9b224b1b6a4c87f7a816394768b4222e045946a0afad2cf70b64a",
- "snomed_code": "719410009",
- "snomed_term": "Consultation via video conference",
- "table": null,
- "text": "video",
- "units": null,
- "value": false
}
]
}, - "status": "succeeded"
}, - "id": "3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40",
- "type": "request"
}
}Submit a document as raw file bytes via multipart/form-data, for callers who would rather not base64-encode. The file goes in the document part and the JSON-encoded request metadata in the request part. Processing and result retrieval via GET /api/requests/{id} are identical to POST /api/requests.
curl -X POST https://{organisation}.core-platform.dyad.net/api/upload_document \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-F "document=@referral.pdf" \
-F 'request={"entities":["slots"],"format":"json"}'
Example response — 201 Created
{
"document": "JVBERi0xLjQKJUVPRg==",
"id": "1f0a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
"request": {
"entities": [
"slots"
],
"format": "json"
}
}
Example error — 400 Bad Request
{
"errors": [
{
"detail": "The `request` part must be valid JSON",
"status": "400",
"title": "Invalid request"
}
]
}
Document upload
| document required | string <binary> The file to upload |
| request required | string JSON-encoded request metadata, e.g. {"entities":["slots"],"format":"json"} |
{- "document": "JVBERi0xLjQKJUVPRg==",
- "id": "1f0a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
- "request": {
- "entities": [
- "slots"
], - "format": "json"
}
}Work in progress
Submit many documents in one call by pointing Core Platform at a location in an object-storage bucket it has been granted read access to. data.attributes.request is applied to every document in the batch; data.attributes.source names the bucket and either a prefix to enumerate or an explicit list of keys.
The call returns 201 Created with a batch id. Poll GET /api/requests/batch/{id} for progress and the per-document request ids, then retrieve each document with GET /api/requests/{id} as normal.
Until this is available the endpoint responds 404 Not Found.
curl -X POST https://{organisation}.core-platform.dyad.net/api/requests/batch \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "request-batch",
"attributes": {
"request": { "entities": ["slots"], "format": "json" },
"source": { "bucket": "acme-inbound", "prefix": "referrals/2023-02/" }
}
}
}'
Example response — 201 Created
{
"data": {
"attributes": {
"request": {
"entities": [
"slots"
],
"format": "json"
},
"source": {
"bucket": "acme-inbound",
"prefix": "referrals/2023-02/"
},
"status": "pending"
},
"id": "b1a2c3d4-0000-4000-8000-000000000001",
"type": "request-batch"
}
}
| include | string^()(,())*$ Relationship paths to include in the response |
Request body for the /requests/batch operation
required | object |
{- "data": {
- "attributes": {
- "request": {
- "entities": [
- "slots"
], - "format": "json"
}, - "source": {
- "bucket": "acme-inbound",
- "prefix": "referrals/2023-02/"
}
}, - "type": "request-batch"
}
}{- "data": {
- "attributes": {
- "request": {
- "entities": [
- "slots"
], - "format": "json"
}, - "source": {
- "bucket": "acme-inbound",
- "prefix": "referrals/2023-02/"
}, - "status": "pending"
}, - "id": "b1a2c3d4-0000-4000-8000-000000000001",
- "type": "request-batch"
}
}Work in progress
Return the state of the batch identified by id: its overall status, totals, and a documents array pairing each source object key with its per-document request id and status. Individual documents are retrieved with GET /api/requests/{id}.
Until this is available the endpoint responds 404 Not Found for every id.
curl https://{organisation}.core-platform.dyad.net/api/requests/batch/b1a2c3d4-0000-4000-8000-000000000001 \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Accept: application/vnd.api+json"
Example response — 200 OK
{
"data": {
"attributes": {
"documents": [
{
"id": "3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40",
"key": "referrals/2023-02/0001.pdf",
"status": "succeeded"
},
{
"id": "5c6d7e8f-2a3b-4c5d-9e0f-1a2b3c4d5e6f",
"key": "referrals/2023-02/0002.pdf",
"status": "succeeded"
},
{
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"key": "referrals/2023-02/0003.pdf",
"status": "pending"
}
],
"request": {
"entities": [
"slots"
],
"format": "json"
},
"source": {
"bucket": "acme-inbound",
"prefix": "referrals/2023-02/"
},
"status": "processing",
"totals": {
"documents": 3,
"failed": 0,
"pending": 1,
"succeeded": 2
}
},
"id": "b1a2c3d4-0000-4000-8000-000000000001",
"type": "request-batch"
}
}
| id required | string |
| include | string^()(,())*$ Relationship paths to include in the response |
{- "data": {
- "attributes": {
- "documents": [
- {
- "id": "3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40",
- "key": "referrals/2023-02/0001.pdf",
- "status": "succeeded"
}, - {
- "id": "5c6d7e8f-2a3b-4c5d-9e0f-1a2b3c4d5e6f",
- "key": "referrals/2023-02/0002.pdf",
- "status": "succeeded"
}, - {
- "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
- "key": "referrals/2023-02/0003.pdf",
- "status": "pending"
}
], - "request": {
- "entities": [
- "slots"
], - "format": "json"
}, - "source": {
- "bucket": "acme-inbound",
- "prefix": "referrals/2023-02/"
}, - "status": "processing",
- "totals": {
- "documents": 3,
- "failed": 0,
- "pending": 1,
- "succeeded": 2
}
}, - "id": "b1a2c3d4-0000-4000-8000-000000000001",
- "type": "request-batch"
}
}Work in progress
Register an HTTPS url to be called for the batch identified by id. By default only batch.completed / batch.failed are delivered; add batch.document.succeeded / batch.document.failed to events to also be notified per document. Optionally supply a secret for callback signing. Returns 201 Created with a subscription id.
The shape of the callback Core Platform sends is documented under Callbacks below.
Until this is available the endpoint responds 404 Not Found for every id.
curl -X POST https://{organisation}.core-platform.dyad.net/api/requests/batch/b1a2c3d4-0000-4000-8000-000000000001/notifications \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "notification-subscription",
"attributes": {
"url": "https://acme.example.com/hooks/core-platform",
"events": ["batch.completed", "batch.failed"]
}
}
}'
Example response — 201 Created
{
"data": {
"attributes": {
"events": [
"request.succeeded",
"request.failed"
],
"url": "https://acme.example.com/hooks/core-platform"
},
"id": "ns_7b2c\u2026",
"type": "notification-subscription"
}
}
| id required | string |
Notification subscription to register
required | object |
{- "data": {
- "attributes": {
- "events": [
- "batch.completed",
- "batch.failed"
], - "secret": "whsec_3f9a…",
}, - "type": "notification-subscription"
}
}{- "data": {
- "attributes": {
- "events": [
- "request.succeeded",
- "request.failed"
],
}, - "id": "ns_7b2c…",
- "type": "notification-subscription"
}
}{- "created_at": "2023-02-17T10:15:00Z",
- "data": {
- "batch": {
- "id": "b1a2c3d4-0000-4000-8000-000000000001",
- "status": "completed",
- "totals": {
- "documents": 3,
- "failed": 0,
- "pending": 0,
- "succeeded": 3
}
}
}, - "id": "evt_9c8b7a…",
- "type": "batch.completed"
}Work in progress
Register an HTTPS url to be called when the request identified by id reaches a terminal state (succeeded or failed). Optionally narrow delivery with events and supply a secret for callback signing. Returns 201 Created with a subscription id.
The shape of the callback Core Platform sends is documented under Callbacks below.
Until this is available the endpoint responds 404 Not Found for every id.
curl -X POST https://{organisation}.core-platform.dyad.net/api/requests/3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40/notifications \
-H "Authorization: Bearer $EDGE_API_TOKEN" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "notification-subscription",
"attributes": {
"url": "https://acme.example.com/hooks/core-platform",
"events": ["request.succeeded", "request.failed"]
}
}
}'
Example response — 201 Created
{
"data": {
"attributes": {
"events": [
"request.succeeded",
"request.failed"
],
"url": "https://acme.example.com/hooks/core-platform"
},
"id": "ns_7b2c\u2026",
"type": "notification-subscription"
}
}
| id required | string |
Notification subscription to register
required | object |
{- "data": {
- "attributes": {
- "events": [
- "request.succeeded",
- "request.failed"
], - "secret": "whsec_3f9a…",
}, - "type": "notification-subscription"
}
}{- "data": {
- "attributes": {
- "events": [
- "request.succeeded",
- "request.failed"
],
}, - "id": "ns_7b2c…",
- "type": "notification-subscription"
}
}{- "created_at": "2023-02-17T10:15:00Z",
- "data": {
- "request": {
- "id": "3f2a9c7e-1b4d-4e8a-9c2f-7a1e5d6b3c40",
- "status": "succeeded"
}
}, - "id": "evt_9c8b7a…",
- "type": "request.succeeded"
}