The purpose of this API is to update invoice.
Request
URL |
https://your_account.modulus.biz/api/inv/v1/Invoice?token=YOUR_TOKEN |
API Name |
Invoice |
Method |
PATCH |
Source |
Third Party Server |
Recipient |
modulus® Server |
Content Type |
application/json |
Query String Parameters
Parameter |
Required |
Type |
Description |
token |
Yes |
Text |
Your authentication token. |
Payload Parameters
Parameter |
Required |
Type |
Description |
|
Yes |
Int |
The id of the invoice we want to change status |
|
Yes |
Text |
possible values for status (STATUS_SENT,STATUS_VOID) |
|
Yes |
Text |
The number of the invoice we want to change status |
|
No |
Date |
The date we want to void the invoice in |
Responses
HTTP Status |
result |
title |
message |
object |
Success Responses |
|
|
|
|
200 OK |
true |
Success |
Invoice Status changed successfully |
|
Failure Responses |
|
|
|
|
400 Bad Request |
false |
Error |
Error message as elaborated here. |
{ "error_code": xxx } |
500 Internal Server Error |
false |
Error |
Error message as elaborated here. |
{ "error_code": xxx } |
Example 1
Request | curl --request PATCH 'https://your_account.modulus.biz/api/inv/v1/Invoice?token=YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "customer_details": { "invoice_id": "35", "status": "STATUS_SENT", "invoice_number": "INV_2023_01_01_828 ", "void_date": "2023-01-14 19:59:22 " }' |
---|
200 OK | { "result": true, "title": "Success", "message": "Invoice Status changed successfully"} |
---|
Example 2
Request | curl --request PATCH 'https://your_account.modulus.biz/api/inv/v1/Invoice?token=YOUR_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "customer_details": { "invoice_id": "35", "status": "STATUS_VOID", "invoice_number": "INV_2023_01_01_828 ", "void_date": "2025-01-14 19:59:22 " }' |
---|
400 Bad Request | { "result": false, "title": "Error", "message": "The void date cannot be in the future."} |
---|