Import InvoiceV1

Import Invoice

Beta
POST
Import an existing invoice from a third party service to reflect state in Candid.

Request

This endpoint expects an object.
patient_external_id
stringRequired
external_customer_identifier
stringRequired
Id of the customer in the source system
items
list of objectsRequired
status
enumRequired
external_identifier
stringRequired
Id of the invoice being imported in the source system. Warning - This field CANNOT be updated.
note
stringOptional
due_date
dateOptional

If given as None, days_until_due in the payment config will be used to create a default date

customer_invoice_url
stringOptional
Link to the patient view of the invoice in the third-party service

Response

This endpoint returns an object
id
UUID
created_at
datetime
updated_at
datetime
items
object
The InvoiceItem rollup which contains all claim and service line invoice items
patient_external_id
string
external_customer_identifier
string
Id of the customer in the source system
status
enum
external_identifier
string
Id of the invoice being imported in the source system
due_date
date
amount_cents
integer
Total monetary amount (in cents) of all Invoice Items
note
stringOptional
customer_invoice_url
stringOptional
Link to the patient view of the invoice in the third-party service
POST
1curl -X POST https://api.joincandidhealth.com/api/import-invoice/v1 \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "patient_external_id": "string",
6 "external_customer_identifier": "string",
7 "items": [
8 {
9 "attribution": {
10 "type": "service_line_id",
11 "value": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
12 },
13 "amount_cents": 0
14 }
15 ],
16 "status": "DRAFT",
17 "external_identifier": "string"
18}'
200Successful
1{
2 "id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
3 "created_at": "2023-01-01T00:00:00Z",
4 "updated_at": "2023-01-01T00:00:00Z",
5 "items": {
6 "claim_invoice_items": {
7 "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32": {
8 "service_line_invoice_items": {
9 "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32": {
10 "service_line_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
11 "amount_cents": 0
12 }
13 },
14 "claim_invoice_item": {
15 "claim_id": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
16 "amount_cents": 0
17 }
18 }
19 },
20 "unattributed_items": [
21 {
22 "amount_cents": 0
23 }
24 ]
25 },
26 "patient_external_id": "string",
27 "external_customer_identifier": "string",
28 "status": "DRAFT",
29 "external_identifier": "string",
30 "due_date": "2023-01-01",
31 "amount_cents": 0,
32 "note": "string",
33 "customer_invoice_url": "string"
34}