Crea una bozza di preventivo dal listino
curl --request POST \
--url https://api.dentalspace.ai/v1/treatment-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"treatmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"tooth": 48,
"surface": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"facilityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
items: [
{
treatmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 1,
tooth: 48,
surface: '<string>'
}
],
name: '<string>',
description: '<string>',
doctorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
facilityId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.dentalspace.ai/v1/treatment-plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dentalspace.ai/v1/treatment-plans"
payload = {
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"treatmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"tooth": 48,
"surface": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"facilityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"facilityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": "draft",
"totalCost": 123,
"presentedAmount": 123,
"presentedAt": "<string>",
"acceptedAmount": 123,
"acceptedAt": "<string>",
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"treatmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"cost": 123,
"status": "<string>",
"priority": 0,
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tooth": 0,
"surface": "<string>",
"treatmentArea": "<string>",
"diagnosisId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"odontogramType": "<string>",
"toothData": {},
"diagnoses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tooth": 0,
"issueType": "<string>",
"issueCategory": "<string>",
"treatmentArea": "<string>",
"surfaces": [
"<string>"
],
"severity": "<string>",
"note": "<string>",
"status": "<string>"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Preventivi
Crea una bozza di preventivo dal listino
Scope: treatment_plans:write.
I prezzi sono quelli del listino. Nasce sempre come bozza (draft): la conferma una persona nell’app.
POST
/
treatment-plans
Crea una bozza di preventivo dal listino
curl --request POST \
--url https://api.dentalspace.ai/v1/treatment-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"treatmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"tooth": 48,
"surface": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"facilityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patientId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
items: [
{
treatmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 1,
tooth: 48,
surface: '<string>'
}
],
name: '<string>',
description: '<string>',
doctorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
facilityId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.dentalspace.ai/v1/treatment-plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dentalspace.ai/v1/treatment-plans"
payload = {
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"treatmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1,
"tooth": 48,
"surface": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"facilityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"facilityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": "draft",
"totalCost": 123,
"presentedAmount": 123,
"presentedAt": "<string>",
"acceptedAmount": 123,
"acceptedAt": "<string>",
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"treatmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"cost": 123,
"status": "<string>",
"priority": 0,
"doctorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tooth": 0,
"surface": "<string>",
"treatmentArea": "<string>",
"diagnosisId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"odontogramType": "<string>",
"toothData": {},
"diagnoses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tooth": 0,
"issueType": "<string>",
"issueCategory": "<string>",
"treatmentArea": "<string>",
"surfaces": [
"<string>"
],
"severity": "<string>",
"note": "<string>",
"status": "<string>"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Facoltativa. La stessa chiave entro 24 ore ripete la prima risposta 2xx.
Maximum string length:
255Body
application/json
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Required array length:
1 - 256 elementsShow child attributes
Show child attributes
Required string length:
1 - 200Maximum string length:
2000Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Predefinita: la sede del paziente.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Response
La bozza creata.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Available options:
draft, proposed, standby, accepted, rejected, in_progress, completed Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Show child attributes
Show child attributes
Solo con clinical:read.
Solo con clinical:read.
Show child attributes
Show child attributes
Solo con clinical:read.
Show child attributes
Show child attributes