Retrieve invoices

This endpoint allows you to fetch available, finalised invoices for a specific timeframe.

Depending on the number of active contracts and contract types associated, multiple invoices may be returned in a single response.

Response structure

ParameterDescriptionSupported values
InvoicesReadyA group pf parameters related to the invoiceInvoicesReady (has list of child objects of its own, see the InvoicesReady child objects table below)

InvoicesReady child objects

Parameter

Description

Supported values

ActivityStartDate

The start date of the activity

<int> Integer

InvoiceID

The unique identifier for the invoice

<int> Integer

AccountID

The unique identifier for the account

<int> Integer

BillingProfileID

The unique identifier for the Billing status

<int> Integer

ApprovalStatus

The approval status of the invoice

<std::string>

FileName

The name of the file

<std::string>

EFileID

The unique identifier for the e-file

<int> Integer

InvoiceDate

The date of invoice generation

<std::string>

Name

The name of the invoice

<std::string>

Status

The status of the invoice

<std::string>

Contracts

The contract details

Contracts (has child objects of its own see the

Contracts child objects

table below)

Contracts child objects

Parameter

Description

Supported values

ContractID

The unique identifier for the contract

<int> Integer

ContractNumber

The number of the contract

<std::string>

AccountName

The name of the account under the contract

<std::string>

Name

The name of the product

<std::string>

Sample response

The response includes a ContractID for each invoice. This ContractID is essential for further actions, such as retrieving the list of services associated with the invoice and obtaining detailed usage data for individual devices. Use this ID with the relevant endpoints to explore services and usage details tied to the invoice.

{
   "InvoicesReady":[
      {
         "ActivityStartDate":"2024-11-01",
         "InvoiceID":"346789",
         "AccountID":"234576",
         "BillingProfileID":"1234",
         "ApprovalStatus":"APPROVED",
         "FileName":"efile_12351245.csv",
         "EFileID":"12351245",
         "InvoiceDate":"December  01, 2024",
         "Name":"Best MSP",
         "Status":"CLOSED",
         "Contracts":[
            {
               "ContractID":"234578",
               "ContractNumber":"MSP-234578-04",
               "AccountName":"Best MSP",
               "Name":"Cove Data Protection | DPP | MSP | Monthly | Selected Size"
            }
         ]
      }
   ]
}

Possible errors

{
    "Failed": "Invoices Ready API Failed",
    "sfdcAccountId": "001H234578asdfIAS",
    "Message": { 
    	"Overall status": "Invoices Ready API Failed",
    	"AccountId": "001H234578asdfIAS",
    	"Message": "There are no Invoices Ready"
    }
}
🚧

The above error depicts that there no invoices are ready. The call was successful, but no invoices are able to be retrieved for the given timeframe. Ensure the timeframe is formatted correctly (YYYYMM) and is not in the future. The above error is 401 unauthorized: Check that you have entered your MSPID and API key correctly.

{
    "message": "Unauthorized",
    "http_status_code": 401
}
🚧

The above error is 401 unauthorized: Check that you have entered your MSPID and API key correctly.

Language
Click Try It! to start a request and see the response here!