The Stock Closing Entry object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
Default: draft
{
"id": "stock-closing-entry_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"from_date": "2024-01-15",
"to_date": "2024-01-15"
} /api/stock/stock-closing-entry/{id} Retrieve a stock closing entry
Retrieves the details of an existing stock closing entry. Supply the unique stock closing entry ID that was returned from a previous request.
Path parameters
The identifier of the stock closing entry to retrieve.
Returns
Returns the stock closing entry object if a valid identifier was provided.
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "stock-closing-entry_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"from_date": "2024-01-15",
"to_date": "2024-01-15"
} /api/stock/stock-closing-entry List all stock closing entrys
Returns a list of stock closing entrys. The results are sorted by creation date, with the most recently created appearing first.
Query parameters
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of stock closing entry objects.
curl https://api.overplane.dev/api/stock/stock-closing-entry \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "stock-closing-entry_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"from_date": "2024-01-15",
"to_date": "2024-01-15"
}
],
"has_more": false,
"total": 1
} /api/stock/stock-closing-entry Create a stock closing entry
Creates a new stock closing entry object.
Body parameters
Default: draft
Returns
Returns the newly created stock closing entry object if the call succeeded.
curl https://api.overplane.dev/api/stock/stock-closing-entry \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" {
"id": "stock-closing-entry_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"from_date": "2024-01-15",
"to_date": "2024-01-15"
} /api/stock/stock-closing-entry/{id} Update a stock closing entry
Updates the specified stock closing entry by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the stock closing entry to update.
Body parameters
Default: draft
Returns
Returns the updated stock closing entry object.
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"status":"draft","company":"Example Corp"}' {
"id": "stock-closing-entry_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"from_date": "2024-01-15",
"to_date": "2024-01-15"
} /api/stock/stock-closing-entry/{id} Delete a stock closing entry
Permanently deletes a stock closing entry. This cannot be undone.
Path parameters
The identifier of the stock closing entry to delete.
Returns
Returns a confirmation that the stock closing entry has been deleted.
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "stock-closing-entry_abc123",
"deleted": true
} /api/stock/stock-closing-entry/{id}/submit Submit a stock closing entry
Submits a draft stock closing entry, transitioning its status from draft to submitted.
Path parameters
The identifier of the stock closing entry to act on.
Returns
Returns the stock closing entry object with updated status.
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123/submit \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"id": "stock-closing-entry_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"from_date": "2024-01-15",
"to_date": "2024-01-15"
} /api/stock/stock-closing-entry/{id}/cancel Cancel a stock closing entry
Cancels a submitted stock closing entry, transitioning its status to cancelled.
Path parameters
The identifier of the stock closing entry to act on.
Returns
Returns the stock closing entry object with updated status.
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123/cancel \
-H "Authorization: Bearer sk_test_..." \
-X POST {
"id": "stock-closing-entry_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"status": "draft",
"company": "Example Corp",
"from_date": "2024-01-15",
"to_date": "2024-01-15"
}