Desk API - what is the correct way to associate a new ticket to an account.

Desk API - what is the correct way to associate a new ticket to an account.

We are trying to automate the creation of tickets that are linked directly to an accountId 

Some background. 
When we onboard a new customer, we create their new account in Zoho Desk that contains all of the company details for that customer, and we link that accountId to our other integrated system. 
We also create a contact for that customer, but it is initially only one or two contacts. 

We offer customers a QR Code that is intended to link them directly to a form to create a support ticket. 
This all works in terms of creating a ticket - but the accountId is never set. (The accountID is embedded in the QRCode)

It appears that the logic is that the ticket belongs firstly and foremost to the contact that raised it 
and only secondly to the account (which in our case is the paying customer) and even then only if they already exist and are already linked to the account.

The system does not seem to handle the creation of a ticket assigned to an account for a new contact 

Can you please explain how I should use the API to create a new ticket for an existing account that is from a new contact that has never interacted with the system before. 

Currently we pass the contact details of the contact and the system automatically creates the contact if needed and creates the ticket - but it never associates the ticket to the account. 

  1. {"cf":{"cf_documentation_request":"Network Details"},"productId":"1234567890","subject":"New Document Request from test new customer","departmentId":"887766554433","description":"New Document Request","accountId":"11_we_pass_this_in_but_it_isnever_set_22","priority":"High","classification":"Documentation Request","contact":{"phone":"0418111222","email":"test2@acme.com.au","firstName":"New Contact"},"status":"Open"}
The above code executes without an error - but the resulting ticket is NOT assigned to the Account
And the new contact is created but NOT associated with the Account.

The return API result confirms this as it includes 

  1. ..."commentCount":"0","taskCount":"0","accountId":null,...

Please advise how this is meant to be done.