Ananas APItest bench
staging api.qa2.ananastest.com
TC-STOCK-01 Positive changes data

Updating quantity with a valid ID (seller warehouse)

Verify that the system accepts a valid quantity change for a product in the seller warehouse

Specification · xlsx

Steps

  1. Send the request with a valid ID and quantity

Expected result

HTTP 200; quantity updated immediately

Endpoints

PUT /product/api/v1/merchant-integration/product/bulk

Run

API_URL
https://api.qa2.ananastest.com
TARGET_ID
2555660

Change parameters

A dry run builds every request without sending it; responses come from a local stub.

Test code

mirrors tests/BulkTest.php::tc_stock_01()
150// Verify that the system accepts a valid quantity change for a product in the seller warehouse
151public function tc_stock_01(): void
152{
153 $targetId = (int) $_ENV['TARGET_ID'];
154
155 $productData = [
156 [
157 'id' => $targetId,
158 'stockLevel' => 123,
159 ],
160 ];
161
162 $response = $this->ananas->editInBulk($productData);
163
164 $this->assertEquals(200, $response['statusCode']);
165 $this->assertEquals('SUCCESS', $response['response'][0]['status']);
166}

web/app/Scenarios/BulkScenarios.php · line numbers refer to this file

Not run yet. Run it against the API, or do a dry run to see the requests it would send.