All editions of Manager support the API, including /api, /api2 and /api3.
Manager’s Api2 does not use the standard Authorization header.
Instead, it requires an X-API-KEY header, where the value is the AccessToken generated within Manager.
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://127.0.0.1:59883/api2/access-tokens");
request.Headers.Add("X-API-KEY", "ChFNeUludm9pY2Ug,,,,,,,,,n04uwbnsYU8Ro4b1F1E64iA=");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Hello @Mabaega
and super thank you for your kind support.
i have another thing
When I try to create a new Inventory Item using a POST request,
I get a response with 200 OK and a JSON object,
but the new item does not appear in my business data.
In the History, I only see “Tabs created” without actual product details being saved.
Here is an example of the request I tried in Postman:
POST https://{mybusiness}.manager.io/api2/inventory-items
Headers:
X-API-KEY: <my token>
Content-Type: application/json
Body (raw JSON):
{
"Name": "API Test Item 001",
"Code": "SKU-001",
"SalesPrice": 150,
"PurchasePrice": 100
}
Questions:
What is the correct endpoint to create a new Inventory Item?
Should I use /tabs-form or /inventory-items?
What are the required fields and their exact names (e.g. "Name", "Code", "SalesPrice", "PurchasePrice", etc.)?
Is there any example in the documentation for posting new items to inventory-items?
I want to confirm the correct structure, because currently the API shows success (201/200) but no actual item is created.