The Stock Closing Entry object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

status string

Default: draft

company string
from_date string
to_date string
The Stock Closing Entry object
{
  "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"
}
GET /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

id string required

The identifier of the stock closing entry to retrieve.

Returns

Returns the stock closing entry object if a valid identifier was provided.

GET /api/stock/stock-closing-entry/{id}
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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"
}
GET /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

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of stock closing entry objects.

GET /api/stock/stock-closing-entry
curl https://api.overplane.dev/api/stock/stock-closing-entry \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}
POST /api/stock/stock-closing-entry

Create a stock closing entry

Creates a new stock closing entry object.

Body parameters

status string

Default: draft

company string
from_date string
to_date string

Returns

Returns the newly created stock closing entry object if the call succeeded.

POST /api/stock/stock-closing-entry
curl https://api.overplane.dev/api/stock/stock-closing-entry \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json"
Response
{
  "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"
}
PATCH /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

id string required

The identifier of the stock closing entry to update.

Body parameters

status string

Default: draft

company string
from_date string
to_date string

Returns

Returns the updated stock closing entry object.

PATCH /api/stock/stock-closing-entry/{id}
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"}'
Response
{
  "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"
}
DELETE /api/stock/stock-closing-entry/{id}

Delete a stock closing entry

Permanently deletes a stock closing entry. This cannot be undone.

Path parameters

id string required

The identifier of the stock closing entry to delete.

Returns

Returns a confirmation that the stock closing entry has been deleted.

DELETE /api/stock/stock-closing-entry/{id}
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "stock-closing-entry_abc123",
  "deleted": true
}
POST /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

id string required

The identifier of the stock closing entry to act on.

Returns

Returns the stock closing entry object with updated status.

POST /api/stock/stock-closing-entry/{id}/submit
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123/submit \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "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"
}
POST /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

id string required

The identifier of the stock closing entry to act on.

Returns

Returns the stock closing entry object with updated status.

POST /api/stock/stock-closing-entry/{id}/cancel
curl https://api.overplane.dev/api/stock/stock-closing-entry/stock-closing-entry_abc123/cancel \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "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"
}