Hey all,
Happy New Year to you all,
New year, new challenges
I’m trying to create an invoice in Xero and add a tracking option to the lines. I wondered if any one can help here. I’ve created a Loom to try and explain.
Any tips welcomed
Cheers
Hey all,
Happy New Year to you all,
New year, new challenges
I’m trying to create an invoice in Xero and add a tracking option to the lines. I wondered if any one can help here. I’ve created a Loom to try and explain.
Any tips welcomed
Cheers
Hi @Jason_Jakarta
try to create one line item manually and check if it works for you with the tracking that you want !! , make sure you are using the right ID and mapping is right .
Thank you !!
Hey @Jason_Jakarta ,
Looking at the API reference it might be that your JSON isn’t fully correct. This is what it’s expecting:
"Tracking": [
{
"TrackingCategoryID": "e2f2f732-e92a-4f3a9c4d-ee4da0182a13",
"Name": "Activity/Workstream",
"Option": "Onsite consultancy"
}
]
With the following requirements:
Does this help you create the correct JSON?
Hey Bjorn,
Thanks, that was the issue. I was confused as to why it needed the CategoryID and Name and so I was using category id only. I recreated the module and all worked OK.
This was the JSON I used to create the data structure if anyone else needs it:
{
"ItemCode": "12",
"Description": "Onsite project management ",
"Quantity": "1.0000",
"UnitAmount": "1800.00",
"TaxType": "OUTPUT",
"TaxAmount": "225.00",
"LineAmount": "1800.00",
"AccountCode": "200",
"Tracking": [
{
"TrackingCategoryID": "e2f2f732-e92a-4f3a9c4d-ee4da0182a13",
"Name": "Activity/Workstream",
"Option": "Onsite consultancy"
}
]
}
Thanks for you help, it was the JSON structure that was the problem.
Apricate your input👍🏻