Get invoice status
Get invoice status.
Endpoint
GET /integration/invoice/{id}/status
HTTP Request
GET /integration/invoice/{id}/status
Query parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | Identifier of the invoice | Yes | string |
Successful response
{
"invoiceId": "generic_invoice_test_06072024_friday_2",
"status": "Placed",
"creditInfo": {
"accountStatus": "active",
"masterStatus": "active",
"pastDue30": 450.0,
"pastDue60": 0.0,
"pastDue90": 0.0,
"pastDue90Plus": 0.0,
"availableCredit": 5000.0,
"limit": 10000,
"balance": 5000,
"pastDueAmount": 450,
"processingAmount": 0.0,
"creditType": "LOC",
"automatedDrawApprovalInfo": {
"isEnabled": true,
"singleDrawMaxLimit": 10000,
"creditLimitPercentageAvailableToUseAutomatically": 10,
"dailyLimit": 1000000,
"weeklyLimit": 1000000
}
},
"totalAmount": 4550
}
Response parameters
| Name | Description | Type |
|---|---|---|
| invoiceId | Identifier of the invoice. | string |
| status | Status of the invoice | string |
| creditInfo | The credit info. | object |
| totalAmount | The invoice total amount. | decimal |
Erroneous response
HTTP 404
{
"code": "404",
"reason": "Invoice not found."
}
Responses
| Code | Description |
|---|---|
| 200 | Successful operation |
| 400 | Invalid request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Unexpected error |
Objects
Credit Information Details Object
| Name | Description | Type |
|---|---|---|
| accountStatus | The credit account status | string |
| masterStatus | The business master status | string |
| pastDue30 | The past due amounts in 1-30 days | decimal |
| pastDue60 | The past due amounts in 31-60 days | decimal |
| pastDue90 | The past due amounts in 61-90 days | decimal |
| pastDue90Plus | The past due amounts in 91-... days | decimal |
| availableCredit | The available credit. Empty if not approved. | decimal |
| limit | The company approved credit limit. Empty if not approved. | decimal |
| balance | The unpaid amount of the company credit | decimal |
| pastDueAmount | Total past due amount for the company. Empty if not approved. | decimal |
| processingAmount | The processing payments amount | decimal |
| creditType | The credit type | string |
| automatedDrawApprovalInfo | The automated approval information | object |
Automated Draw Approval Information Object
| Name | Description | Type |
|---|---|---|
| isEnabled | Is automated approval enabled | boolean |
| singleDrawMaxLimit | Maximum amount of a draw to approve automatically | number |
| creditLimitPercentageAvailableToUseAutomatically | The percentage of credit could be used for automatic approval | number |
| dailyLimit | Daily limit of amounts to approve automatically | number |
| weeklyLimit | Last 7 days limit of amounts to approve automatically | number |
Enums
Invoice status
- Draft - Created, but customer can not pay it, due to invoice or customer settings
- Placed - Invoice Created, but no payment exist
- InReview - User pay invoice with BlueTapeCredit and application need to be reviewed by BlueTape admin
- Approved - Invoice is approved
- PaymentProcessing - BlueTape start payment for invoice
- Paid - Invoice is paid in BlueTape
- Rejected - Credit aplication was rejected by BlueTape admin, and user can not pay with BlueTape credit any new invoice for 6 month
- Canceled - Credit application was canceled by BlueTape admin, and user can pay next invoice with BlueTape credit
- Failed - something go wrong during payment of invoice
- ApplicationAdminApprovalRequired - Admin approval is required
Master status
- New
- Active
- InCollection
- Inactive
- PotentiallyFraud
- Closed
Account status
- Active
- Closed
- PastDue
- OnHold
- InCollection
Credit Types
- Default
- IHC
- LOC
Examples
curl https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>/status \
-X GET \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
import fetch from 'node-fetch';
const invoiceId = '27be905508e7';
const url = `https://api.bluetape.com/genericBthubService/integration/invoice/${invoiceId}/status`;
const options = {
method: 'GET',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/json'
}
};
fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;
var result = await "https://api.bluetape.com/genericBthubService/integration/invoice/{invoiceId}/status"
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.GetAsync();
import requests
url = "https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>/status"
headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.text)