curl --request POST \
--url https://api.valyx.com/external/creditNotes/upsert \
--header 'Content-Type: application/json' \
--header 'X-Valyx-Signature: <x-valyx-signature>' \
--data '
{
"creditNote": {
"creditNoteId": "<string>",
"creditNoteNumber": "<string>",
"creditNoteDate": "2023-12-25",
"customerDetails": {
"buyerId": "<string>",
"name": "<string>",
"registeredAddress": {
"line1": "<string>",
"line2": "<string>",
"state": "<string>",
"city": "<string>",
"country": "<string>",
"zipCode": "<string>"
}
},
"creditNoteTotal": 123,
"creditNoteSubtotal": 123,
"creditNoteTax": {
"total": 0,
"gstTax": {
"totalGst": 0,
"totalGstRate": 0,
"cgst": 0,
"cgstRate": 0,
"sgst": 0,
"sgstRate": 0,
"igst": 0,
"igstRate": 0
},
"cessTax": {
"cess": 0,
"cessRate": 0
},
"serviceTax": {
"serviceTax": 0,
"serviceTaxRate": 0
},
"tdsTax": {
"tds": 0,
"tdsRate": 0
},
"otherTaxes": [
{
"name": "<string>",
"genericTax": 0,
"genericTaxRate": 0
}
],
"cgst": 123,
"sgst": 123,
"igst": 123,
"tds": 0
},
"currency": "INR",
"lineItems": [
{
"subTotal": 0,
"total": 0,
"lineItemDetails": {
"name": "<string>",
"taxRate": 123,
"pricePerItem": 0,
"hsnOrSacCode": "<string>",
"description": "<string>",
"companyId": "<string>",
"erpId": "<string>",
"lineItemId": "<string>"
},
"tax": {
"total": 0,
"gstTax": {
"totalGst": 0,
"totalGstRate": 0,
"cgst": 0,
"cgstRate": 0,
"sgst": 0,
"sgstRate": 0,
"igst": 0,
"igstRate": 0
},
"cessTax": {
"cess": 0,
"cessRate": 0
},
"serviceTax": {
"serviceTax": 0,
"serviceTaxRate": 0
},
"tdsTax": {
"tds": 0,
"tdsRate": 0
},
"otherTaxes": [
{
"name": "<string>",
"genericTax": 0,
"genericTaxRate": 0
}
],
"cgst": 123,
"sgst": 123,
"igst": 123,
"tds": 0
},
"quantity": 1,
"amount": 0
}
],
"tags": {},
"description": "<string>",
"invoiceId": "<string>",
"invoiceNumber": "<string>",
"companyId": "<string>"
}
}
'{}curl --request POST \
--url https://api.valyx.com/external/creditNotes/upsert \
--header 'Content-Type: application/json' \
--header 'X-Valyx-Signature: <x-valyx-signature>' \
--data '
{
"creditNote": {
"creditNoteId": "<string>",
"creditNoteNumber": "<string>",
"creditNoteDate": "2023-12-25",
"customerDetails": {
"buyerId": "<string>",
"name": "<string>",
"registeredAddress": {
"line1": "<string>",
"line2": "<string>",
"state": "<string>",
"city": "<string>",
"country": "<string>",
"zipCode": "<string>"
}
},
"creditNoteTotal": 123,
"creditNoteSubtotal": 123,
"creditNoteTax": {
"total": 0,
"gstTax": {
"totalGst": 0,
"totalGstRate": 0,
"cgst": 0,
"cgstRate": 0,
"sgst": 0,
"sgstRate": 0,
"igst": 0,
"igstRate": 0
},
"cessTax": {
"cess": 0,
"cessRate": 0
},
"serviceTax": {
"serviceTax": 0,
"serviceTaxRate": 0
},
"tdsTax": {
"tds": 0,
"tdsRate": 0
},
"otherTaxes": [
{
"name": "<string>",
"genericTax": 0,
"genericTaxRate": 0
}
],
"cgst": 123,
"sgst": 123,
"igst": 123,
"tds": 0
},
"currency": "INR",
"lineItems": [
{
"subTotal": 0,
"total": 0,
"lineItemDetails": {
"name": "<string>",
"taxRate": 123,
"pricePerItem": 0,
"hsnOrSacCode": "<string>",
"description": "<string>",
"companyId": "<string>",
"erpId": "<string>",
"lineItemId": "<string>"
},
"tax": {
"total": 0,
"gstTax": {
"totalGst": 0,
"totalGstRate": 0,
"cgst": 0,
"cgstRate": 0,
"sgst": 0,
"sgstRate": 0,
"igst": 0,
"igstRate": 0
},
"cessTax": {
"cess": 0,
"cessRate": 0
},
"serviceTax": {
"serviceTax": 0,
"serviceTaxRate": 0
},
"tdsTax": {
"tds": 0,
"tdsRate": 0
},
"otherTaxes": [
{
"name": "<string>",
"genericTax": 0,
"genericTaxRate": 0
}
],
"cgst": 123,
"sgst": 123,
"igst": 123,
"tds": 0
},
"quantity": 1,
"amount": 0
}
],
"tags": {},
"description": "<string>",
"invoiceId": "<string>",
"invoiceNumber": "<string>",
"companyId": "<string>"
}
}
'{}Auth key for fetching ledger entries
Show child attributes
creditNoteId
creditNoteNumber
creditNoteDate
Show child attributes
buyerId
name
Show child attributes
line1
line2
state
city
country
zipCode
creditNoteTotal
creditNoteSubtotal
Show child attributes
total
Show child attributes
totalGst
totalGstRate
cgst
cgstRate
sgst
sgstRate
igst
igstRate
cgst
sgst
igst
tds
currency
Show child attributes
subTotal
total
Show child attributes
name
taxRate
pricePerItem
hsnOrSacCode
description
companyId
erpId
lineItemId
Show child attributes
total
Show child attributes
totalGst
totalGstRate
cgst
cgstRate
sgst
sgstRate
igst
igstRate
cgst
sgst
igst
tds
quantity
amount
description
invoiceId
invoiceNumber
companyId
Success
The response is of type object.