snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Can't upload an manager and parent of location via API requests

Open domad007 opened this issue 6 years ago • 4 comments

I'am trying to upload an manager of location via API request. So i can upload location name, address etc. But not manager I didnt found a request to make this operation. I am working with symfony 5. My request seems like that: 'PUT', 'api/v1/locations/313', [ 'json' => [ 'name' => "test4", 'address' => "test", 'zip' => "test", 'city' => "test", 'country' => "BE", 'manager' => $resp['rows'][0] ] ]

$resp variable contains user informations

domad007 avatar Mar 06 '20 12:03 domad007

$resp variable contains user informations

Meaning what exactly? manager_id would be expecting the numeric ID of the manager.

snipe avatar Mar 06 '20 17:03 snipe

Thanks it works i'have just changed 'manager' to 'manager_id' and i specified the 'id' of the user. It wasn't specified in the doc. Issue can be closed.

domad007 avatar Mar 09 '20 09:03 domad007

Hi Hi! You should be able close this by hitting the little "close issue" button next to comment. ♥

With love, The Support Hero♥

thesupporthero avatar Mar 19 '20 22:03 thesupporthero

Problem solved

domad007 avatar Mar 20 '20 08:03 domad007