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
Headers
Body
application/json
Response
La bozza creata.