How can I modify API to distinguish between delivery and pick-up?

I have a note section where customers can select delivery or pick up. The api is reporting all as delivery. I need to change the below

“note_attributes”:[
{
“name”:“Delivery Date”,
“value”:“2022-02-07”
},
{
“name”:“Message”,
“value”:“Happy Birthday !”
}
],

To this: Pickups need to be returned as this:

“note_attributes”:[
{
“name”:"Pickup-Date,
“value”:“2022-02-07”
},
{
“name”:“Message”,
“value”:“Happy Birthday !”
}
],

Also my notes section is this and I need to pass notes.

“note”:null,

Where do I make these changes?