Backend API
Retrieve an existing stock adjustment using the id that was returned when created.
Arguments
idobjectIdrequired
The id of the stock adjustment to retrieve.
expandstring
Expanding link fields and child collections is performed using the expand argument.
- For example, expand=account would return a related customer account if one exists.
When the field represents a collection, you can specify the query limit.
- For example, expand=variants:10 would return up to 10 records of the variants collection.
See expanding for more details.
fieldsstring
Return only the specified fields in the result.
- For example, fields=name,slug would return only the fields name and slug in the response.
Supports nested object and array fields using dot-notation.
- For example, items.product_id. The stock adjustment id is always returned.
includestring
Include one or more arbitrary queries in the response, possibly related to the main query.
See including for more details.
GET/products:stock/:id
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');
await swell.get('/products:stock/{id}', {
id: '5ca24abb9c077817e5fe2b3b',
});
Response
{
"id": "5ca24abb9c077817e5fe2b3b",
"parent_id": "5ca7d6c68f749692da37c985",
"quantity": 10,
"level": 10,
"number": "100184",
"reason": "received"
"reason_message": "Restock - PO #47362",
"date_created": "2019-04-01T00:00:00.000Z"
"date_updated": "2019-04-01T00:00:00.000Z",
}