Skip to main content

Update Invoice

PUT /api/v1/Invoice/Update

Description

This endpoint is used to update an existing invoice. It returns a CreateInvoiceResponseResponse object containing information about the updated invoice.

Headers:

  • None

ApiKey:

  • No API key required

Content-Type:

  • text/plain

  • application/json

  • text/json

Path Parameters:

  • version: string, required

Query Parameters:

  • None

Request Body:

  • An object of type UpdateInvoice that contains the updated details of the invoice.

URL:

  • PUT: {{baseUrl API url}}/api/v1/Invoice/Update

Response:

  • A CreateInvoiceResponseResponse object containing information about the updated invoice.

Error Codes:

  • 400: Bad Request

  • 404: Resource not found

  • 500: Internal server error

Example:

Request:

PUT /api/v1/Invoice/Update
{
"invoiceId": "1234567890",
"counterpartyId": "0987654321",
"amount": 1500.00,
"currency": "USD",
"status": "Pending"
}

Response:

HTTP/1.1 200 OK
{
"invoiceId": "1234567890",
"counterpartyId": "0987654321",
"amount": 1500.00,
"currency": "USD",
"status": "Pending",
"createdDate": "2024-02-19T00:00:00.000Z",
"dueDate": "2024-03-20T00:00:00.000Z"
}

Method: PUT

/api/v1/Invoice/Update

Headers

Content-TypeValue
Content-Typeapplication/json

Headers

Content-TypeValue
Accepttext/plain

Body (raw)

{
"id": "<uuid>",
"counterPartyId": "<uuid>",
"receivingAccountId": "<uuid>",
"counterPartyName": "<string>",
"accountName": "<string>",
"dueDate": "<dateTime>",
"currency": 1,
"products": [
{
"productId": "<uuid>",
"quantity": "<integer>",
"unitPrice": "<double>"
},
{
"productId": "<uuid>",
"quantity": "<integer>",
"unitPrice": "<double>"
}
],
"taxes": [
{
"taxId": "<uuid>",
"taxPercentageValue": "<double>"
},
{
"taxId": "<uuid>",
"taxPercentageValue": "<double>"
}
],
"discount": {
"discountType": 2,
"discountValue": "<double>"
},
"description": "<string>",
"billingCycle": 6,
"recuringInvoice": "<boolean>",
"paymentMethods": [
"<integer>",
"<integer>"
],
"notification": [
"<integer>",
"<integer>"
],
"beforeDueDates": [
"<integer>",
"<integer>"
],
"afterDueDates": [
"<integer>",
"<integer>"
],
"onDueDate": "<boolean>"
}

Response: 200

{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"invoiceId": "<uuid>",
"amount": "<double>"
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PUT \ 
--url /api/v1/Invoice/Update \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


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