Error while creating a sales Invoice using postman

i am getting below error while creating a invoice using postman. Also please help me in understanding the mandatory fields to create a invoice via postman.

@Arudhra share you invoice body from postman

@Hardik_Gadesha
{
“data”: {
“name”: “INV-2023-00001”,
“posting_date”: “2023-04-15”,
“customer”: “Sales - KD”,
“due_date”: “2023-05-15”,
“ignore_default_payment_terms_template”: 0,
“payment_terms_template”: “30 Days”,
“items”: [
{
“name”: “001”,
“qty”: 1.0
}
]
}
}

@Arudhra

  1. No Need for Name
  2. Do you have Customer as primary Key Sales - KD, ideally it is your ledger and not a customer
  3. what is name in item object ?
  4. add some data like
{
    “data”: {
        “posting_date”: “2023-04-15”,
        “customer”: “Sales - KD”,
        “due_date”: “2023-05-15”,
        “ignore_default_payment_terms_template”: 0,
        “payment_terms_template”: “30 Days”,
        “items”: [
            {
                “item_code”: “001”,
                “qty”: 1.0,
                "rate": 50
            }
        ]
    }
}

Customer as primary Key Sales - KD - yes we have this configured this currently in our system.
name - i am passing as item name 001 - as it is a mandatory field

@Hardik_Gadesha i passed the same data you shared, i am getting the below error

@Arudhra this is just error in typo

{
    "data": {
        "posting_date": "2023-04-15",
        "customer": "Sales - KD",
        "due_date": "2023-05-15",
        "ignore_default_payment_terms_template": 0,
        "payment_terms_template": "30 Days",
        "items": [
            {
                "item_code": "001",
                "qty": 1.0,
                "rate": 50
            }
        ]
    }
}