List the prices Practor knows for a line
From the most particular to the most general: the practitioner's or practice's own price, the patient's medical insurance plan or scheme, a professional body's tariff, and the default price on a practice's own code.
API version 1.3.1
Operations in Invoices
- GET Find invoices by encounter or patient, or list the ones that changed
- GET Read an invoice
- POST Add a line to a draft invoice
- PUT Replace a line on a draft invoice, such as its price
- DELETE Remove a line from a draft invoice
- GET List the prices Practor knows for a line
- POST Issue a draft invoice
- POST Reopen an issued invoice to change it
- GET List the payments made against an invoice
/api/v1/invoices/{invoiceId}/line-items/{lineItemId}/rates Each says the pricingSource to send with it.
The integration client needs INVOICES:READ. A practice owner
grants it under Permissions on the client.
Request
{
"object": "list",
"data": [
{
"object": "rate",
"source": "insurance_plan",
"name": "Classic",
"amount": 40000,
"currency": "ZAR",
"pricingSource": "medical_aid",
"current": false
}
],
"hasMore": true,
"nextCursor": "string"
} Parameters
Path
-
invoiceIdstring Required -
The invoice's id.
-
lineItemIdstring Required -
The invoice line's id.
Responses
200 A page of the rates that match, in data. While hasMore is true, send nextCursor back as cursor for the next page.
Headers
-
X-Request-Idstring Required -
Quote it if you contact support about this request.
-
X-RateLimit-Limitstring Required -
Requests allowed in the current window.
-
X-RateLimit-Remainingstring Required -
Requests left in the current window.
-
X-RateLimit-Resetstring Required -
When the window resets, in seconds since the Unix epoch.
Body
RateList
-
object"list" Required -
dataarray of Rate Required-
object"rate" Required -
sourcestring RequiredWhose price it is: the practitioner's or the practice's own, the patient's medical insurance plan or scheme, a professional body's tariff, or the default price on a practice's own code.
One of
practitioner,practice,insurance_plan,insurance_scheme,governing_body,code_default. -
namestring or null RequiredThe plan, scheme or body it belongs to, where there is one.
-
amountinteger RequiredThe price of one, in the currency's minor unit (cents for ZAR).
At least
-9007199254740991. At most9007199254740991. -
currencystring RequiredISO 4217 currency code. Every amount on the resource is in it.
-
pricingSourcestring RequiredSend it as the line's
pricingSourcewhen you use this rate.One of
governing_body,medical_aid,custom,favorite. -
currentboolean RequiredWhether it is the line's unit price now.
-
-
hasMoreboolean RequiredWhether another page follows this one.
-
nextCursorstring or null RequiredSend it as
cursorfor the next page. Null on the last page.
{
"object": "list",
"data": [
{
"object": "rate",
"source": "insurance_plan",
"name": "Classic",
"amount": 40000,
"currency": "ZAR",
"pricingSource": "medical_aid",
"current": false
}
],
"hasMore": true,
"nextCursor": "string"
} 400 A query parameter or header is missing or malformed, or the body isn't JSON. errors names the parameter.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
} 401 No key was sent, or the key cannot be used: unknown, revoked or expired, its client suspended, or the call made from outside its allowed addresses. All of these answer the same way; the practice audit log names which it was.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
} 403 The client lacks the permission this endpoint needs, or the practice's Integrations add-on is off.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
} 404 The record doesn't exist in this practice. A record in another practice answers the same way.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
} 405 This endpoint doesn't take that method. The Allow header names the one it does.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
} 429 Too many requests. Wait the number of seconds in the Retry-After header, then send it again.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
} 500 Something went wrong on our side. Quote the X-Request-Id if you contact support.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
} 503 The request couldn't be written to the practice audit log, so its result is withheld. Wait the number of seconds in the Retry-After header, then send it again.
Body
Problem
-
typestring RequiredWhere the error is explained:
https://developers.practor.app/guides/errors#and the code, with hyphens for underscores. -
titlestring RequiredA short summary of the kind of problem.
-
statusinteger RequiredThe HTTP status, repeated.
At least
-9007199254740991. At most9007199254740991. -
detailstring RequiredWhat went wrong with this request, in a sentence you can show a person.
-
codestring RequiredThe kind of problem. It stays the same across releases, so branch on it.
One of
invalid_request,invalid_cursor,validation_failed,unauthenticated,forbidden,addon_inactive,not_found,method_not_allowed,conflict,duplicate,business_rule,unprocessable,idempotency_key_reused,payload_too_large,unsupported_media_type,rate_limited,internal_error,service_unavailable. -
requestIdstring RequiredThe same as the X-Request-Id header. Quote it if you contact support.
-
errorsarray of FieldErrorOne entry per field that is missing or wrong, all at once, so you can fix a request in one round trip.
-
fieldstring RequiredThe field, query parameter or header the problem is in. A field in the body is a dotted path, such as
givenNames.0orprocedures.1.code. -
codestring Requiredrequiredwhen it was left out,invalidwhen its value is wrong.One of
required,invalid. -
messagestring RequiredWhat was wrong, in a sentence you can show a person.
-
{
"type": "https://developers.practor.app/guides/errors#validation-failed",
"title": "Some fields are missing or wrong",
"status": 422,
"detail": "Fix the fields listed in errors and send it again.",
"code": "validation_failed",
"requestId": "x9k2m4p7q1w8e3r6t5y0u2i4",
"errors": [
{
"field": "lastName",
"code": "required",
"message": "Send lastName."
},
{
"field": "birthDate",
"code": "invalid",
"message": "birthDate must be a real date, written YYYY-MM-DD"
}
]
}