Overview
A ProviderInvoice endpoint is used to upload NDIS Provider Invoices to MYP. To call this endpoint, use one of the URLs from the following table:
| URL |
GET |
PUT |
POST |
DELETE |
| https://api.mypcorp.com/providerinvoice |
✔ |
|
✔ |
|
| https://api.mypcorp.com/providerinvoice/{ProviderInvoiceGuid} |
✔ |
|
|
|
| https://api.mypcorp.com/providerinvoice/{ProviderInvoiceGuid}/Action |
|
|
✔ |
|
NB: Currently, the MYP API accepts GET and POST requests. PUT requests will be available in the future.
GET
The following table illustrates which fields can be included when receiving a GET response.
NB: Nested properties are hidden by default. To expand all nested properties, add a query parameter $expand=* to the URL.
Provider Invoice
| Field Name |
Description |
ProviderInvoiceGuid Guid (Identifier) |
Provider Invoice id. |
ProviderInvoiceReference string |
Reference to this Provider Invoice. |
ServiceStartDate datetime |
The service start date. |
ServiceEndDate datetime |
The service end date. |
InvoiceTotal decimal |
Total cost amount for the invoice. |
IsReusable boolean |
Is this a reusable invoice or not. |
SendPaymentTo string |
Entity that gets the payment of the provider invoice. SendPaymentTo feature applies only to LanternPay users. Possible values are: “Provider” “Client” “PlanManager” “SupportCoordinator” “ClientRepresentative” |
ApprovalStatus string |
The approval status of this provider invoice. Possible values are: “Unactioned” “Approved” “Rejected” “OnHoldByClient” “OnHoldByPlanManager” |
AutoApproved boolean |
Is this invoice auto approved or not. |
ClaimOnHold boolean |
Is the claim on hold or not. |
RejectionReason string |
Reason the provider invoice was rejected. |
ContactGuid Guid |
Guid of the Contact (which is a Genius Client). |
ProviderGuid Guid |
Guid of the Provider. |
DocumentGuid Guid |
Guid of the uploaded Document. |
CreatedByStaffGuid Guid |
Guid of the Staff member who created this provider invoice. |
ActionedByStaffGuid Guid |
Guid of the Staff member who last actioned this provider invoice. |
ActionedByContactGuid Guid |
Guid of the Contact (which is a Genius Client) who last actioned this provider invoice. |
ActionedTime datetime |
Date and time when this Provider Invoice was last actioned. |
ContactActionedByStaffGuid Guid |
Guid of the Staff member who last actioned this Provider Invoice on behalf of the Contact (which is a Genius Client). |
ActionedForContactTime datetime |
Date and time when this Provider Invoice was last actioned on behalf of the Contact (which is Genius Client). |
CreationDate datetime |
Date and time when this Provider Invoice was created. |
ArchiveDate datetime |
Date and time when this Provider Invoice was archived, if it has been archived. |
Notes object |
A list of provider invoice Notes. |
Notes
| Field Name |
Description |
NoteGuid Guid (Identifier) |
Note id. |
Note string |
The content of the Note. |
CreationDate datetime |
Date and time when this Note was created. |
CreatedByStaffGuid Guid |
Staff member who created this Note. |
CreatedByContactGuid Guid |
Contact who created this Note. |
Example JSON response:
{
"@odata.context": "https://api.mypcorp.com/$metadata#ProviderInvoice(Notes())",
"value": [
{
"ProviderInvoiceGuid": "a9a783ea-f2b1-eb11-b82b-08626626e1a4",
"ProviderInvoiceReference": "Wayne Enterprises Invoice",
"ServiceStartDate": "2021-01-01T08:30:00+10:00",
"ServiceEndDate": "2021-02-01T17:00:51.74+10:00",
"InvoiceTotal": 100.50,
"IsReusable": false,
"SendPaymentTo": "Provider",
"ApprovalStatus": "Unactioned",
"AutoApproved": false,
"ClaimOnHold": null,
"RejectionReason": null,
"ContactGuid": "17ce7d3f-4b6e-464d-9508-a5eb5d4b325c",
"ProviderGuid": "a8956427-fffa-4e07-9cb3-57a5d8741875",
"DocumentGuid": "5ef780d0-789b-4bfd-8457-d81c70b4ea29",
"CreatedByStaffGuid": "2552ae45-5862-46c5-b849-9f07cc0777a1",
"ActionedByStaffGuid": null,
"ActionedByContactGuid": null,
"ActionedTime": null,
"ContactActionedByStaffGuid": null,
"ActionedForContactTime": null,
"CreationDate": "2021-05-11T10:50:45.49+10:00",
"ArchiveDate": null,
"Notes": [
{
"NoteGuid": "defe5f6e-da31-458f-d7ed-08d91416d38e",
"Note": "Created provider invoice",
"CreationDate": "2021-05-11T10:50:52+10:00",
"CreatedByStaffGuid": "b8f2f69a-3f0e-42b1-8cb0-f47472c1ec72",
"CreatedByContactGuid": null
}
]
}
]
}
POST
The following table illustrates which fields can be included when sending a POST request. A number next to the data type (e.g. string (500)), is the maximum number of characters for this field. All required fields must be included in the request body to get a successful response. Dates must be set in the format YYYY-MM-DD hh:mm:ss[.nnn].
NB: When creating a POST request, first make sure to upload a new document at the Document endpoint and use the DocumentGuid for the new Provider Invoice.
Provider Invoice
| Field Name |
Description |
Required |
ProviderInvoiceReference string (100) |
Reference to this Provider Invoice. Required for POST requests if IsReusable field is false. This field must be unique. |
Required (conditional) |
ServiceStartDate datetime |
The service start date. |
Optional |
ServiceEndDate datetime |
The service end date. |
Optional |
InvoiceTotal decimal |
Total cost amount for the invoice. |
Optional |
IsReusable boolean |
Is this a reusable invoice or not. |
Required |
SendPaymentTo string |
Entity that gets the payment of the provider invoice. Automatically assigns “Provider” if not provided. SendPaymentTo feature applies only to LanternPay users. Possible values are: 0 or “Provider” 1 or “Client” 2 or “PlanManager” 3 or “SupportCoordinator” 4 or “ClientRepresentative” |
Optional |
ContactGuid Guid |
Guid of the Contact (which is a Genius Client). Required for POST requests if IsReusable field is false. |
Required (conditional) |
ProviderGuid Guid |
Guid of the Provider. Required for POST requests if IsReusable field is false. |
Required (conditional) |
DocumentGuid Guid |
Guid of the uploaded Document. This field must be unique. |
Required |
CreatedByStaffGuid Guid |
Guid of the Staff member who created this provider invoice. Administer GENIUS provider invoice permission required. |
Required |
Notes object |
A list of provider invoice Notes. |
Optional |
Notes
| Field Name |
Description |
Required |
Note string (1000) |
The content of the Note. |
Required |
CreatedByStaffGuid Guid |
Staff member who created this Note. |
Required |
Example request body:
{
"value": [
{
"ProviderInvoiceReference": "Wayne Enterprises Invoice",
"ServiceStartDate": "2021-01-01T08:30:00.00+10:00",
"ServiceEndDate": "2021-02-01T17:00:51.74+10:00",
"InvoiceTotal": 100.50,
"IsReusable": false,
"SendPaymentTo": "Client",
"ContactGuid": "17ce7d3f-4b6e-464d-9508-a5eb5d4b325c",
"ProviderGuid": "a8956427-fffa-4e07-9cb3-57a5d8741875",
"DocumentGuid": "5ef780d0-789b-4bfd-8457-d81c70b4ea29",
"CreatedByStaffGuid": "2552ae45-5862-46c5-b849-9f07cc0777a1",
"Notes": [
{
"Note": "Approved provider invoice",
"CreatedByStaffGuid": "6f5e4543-f878-4e8d-9729-428f05a6f82a"
}
]
}
]
}
POST Action
The following table illustrates which fields can be included when sending a POST request. Create a new endpoint allowing a Plan Manager to take action (approve or hold) on a Provider Invoice via API version 2.0, accepting one action per request, with optional note support.
Provider Invoice Action
| Field Name |
Description |
Required |
Action string |
The action to perform on the Provider Invoice. Possible values are: “ApproveAsPlanManager” “HoldAsPlanManager” |
Required |
ActionAsStaffGuid Guid |
The unique identifier (GUID) of the staff member performing the action on the Provider Invoice. |
Required |
Note string (1000) |
An optional note to attach to the Provider Invoice when performing the action. Maximum of 1000 characters. |
Optional |
Example request body:
{
"Action": "HoldAsPlanManager",
"ActionAsStaffGuid": "4e26245f-be0a-4fbd-a435-b4b12fdd5fd1",
"Note": "Approved provider invoice"
}
Example success response:
{
"StatusCode": 200,
"Errors": [],
"Warnings": [],
"Value": {
"ProviderInvoiceGuid": "c3fa0ba0-e43f-49b9-83da-12e7299fbb85",
"ContactGuid": "ca3d1732-dccf-4beb-9ec9-7b25b3200a68",
"ProviderGuid": null,
"DocumentGuid": "2b7e1104-4eb6-4add-8a88-927f364cfbb6",
"ProviderInvoiceReference": "c128bac8-1ac1-44d0-81ab-9fc9cec5ab1d",
"ApprovalStatus": "OnHoldByPlanManager",
"ActionedByStaffGuid": null,
"ActionedTime": null,
"ClaimOnHold": true
}
}
Example invalid state response:
{
"StatusCode": 400,
"Value": null,
"Errors": [
"Provider invoice cannot be approved because it has already been actioned."
],
"Warnings": []
}
Example provider invoice not found response:
{
"StatusCode": 404,
"Value": null,
"Errors": [
"Provider invoice not found."
],
"Warnings": []
}
Example staff does not have permission to the action response:
{
"StatusCode": 403,
"Value": null,
"Errors": [
"Staff member does not have permission to action this provider invoice."
],
"Warnings": []
}