/practices/:practice_uid/invoices/:invoice_uid
GET
practice_uid
invoice_uid
Code: 200
Content:
{
uid: '...',
invoice_uid: '...',
description: '...',
...
}
Code: 401
Content: { error: 'Unauthorized' }
Code: 404
Content: { error: 'Practice not found' }
Code: 404
Content: { error: 'Invoice not found' }
/practices/:practice_uid/invoices
GET
practice_uid
Code: 200
Content:
[
{
uid: '...',
practice_uid: '...',
description: '...',
...
},
{
...
}
]
Code: 401
Content: { error: 'Unauthorized' }
Code: 404
Content: { error: 'Practice not found' }
/practices/:practice_uid/invoices
POST
practice_uid
Code: 201
Content:
{
uid: '...',
invoice_uid: '...',
description: '...',
...
}
Code: 422
Content: { error: 'Invoice already exist' }
Code: 401
Content: { error: 'Unauthorized' }
Code: 404
Content: { error: 'Practice not found' }
/practices/:practice_uid/invoices/:invoice_uid
PUT
practice_uid
invoice_uid
Code: 200
Content:
{
uid: '...',
invoice_uid: '...',
description: '...',
...
}
Code: 401
Content: { error: 'Unauthorized' }
Code: 404
Content: { error: 'Practice not found' }
Code: 404
Content: { error: 'Invoice not found' }
/practices/:practice_uid/invoices/:invoice_uid
DELETE
practice_uid
invoice_uid
Code: 200
Content:
{
uid: '...',
invoice_uid: '...',
description: '...',
...
}
Code: 401
Content: { error: 'Unauthorized' }
Code: 404
Content: { error: 'Practice not found' }
Code: 404
Content: { error: 'Invoice not found' }
Notes
-
The endpoints for Patients, Practitioners, etc should be similar.
-
404 Error responses can also indicate that the partner has no permission over the practice (there is no integration between them). A 401 error may also be valid.
-
I assumed that deleting a record uid is the same as deleting the association between the Integration and (in this case) an invoice.