Skip to main content

Update-Invoice

This API is used to update merchant’s invoice By providing correct/required request data/fields with the correct access token, merchant user will be able to update invoice.

Status Description 1 - Draft 2 - Unpaid 3 - Paid 4 - Overdue 5 - Cancelled

sentviaId Description 1 - None 2 - Whatsapp 3 - Email 4 - SMS

https://api-sandbox.sadad.qa/api//invoices/updateInvoice

Permission: Merchant

curl -d "@data.json" -H "Content-Type: application/json" -H "Authorization: {ACCESS_TOKEN}" -X PATCH https://api-sandbox.sadad.qa/api/invoices/updateInvoice
FieldTypeDescription
AuthorizationStringUser's unique access-token
{
"Authorization": "BN79o6YNrY4IPP60UF4JmNEM6O8hX9HVUq0e0HWNyo2tt1jqCT9IWnXSBhfr7Mws"
}

Parameter

FieldTypeDescription
idNumberId of the invoice to update
clientnameStringName of thee client on invoice
status (optional)NumberStatus of invoice
remarks (optional)StringRemarks of invoice
amount (optional)NumberAmount of invoice
invoicedetails (optional)ArrayObjectInvoice is read or not
{
"clientname": "test test",
"invoicedetails": [
{
"description": "invoice test 3",
"quantity": 3,
"amount": 10,
"invoiceId": 8888
}
],
"amount": 15,
"id": 8888
}

Success 200

FieldTypeDescription
countNumberIndicates number of updated items.
{
"count": 1
}

Error 4xx

NameDescription
401Authorization Required
400Invalid data
404Data not found
{
"error": {
"statusCode": 401,
"name": "Error",
"message": "Authorization Required"
}
}