The Warehouse 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.

parent_id string
is_group boolean

Default: false

warehouse_name string required
company string required
disabled boolean

Default: false

account string
email_id string
phone_no string
mobile_no string
address_line_1 string
address_line_2 string
city string
state string
pin string
parent_warehouse string
warehouse_type string
default_in_transit_warehouse string
is_rejected_warehouse boolean

Default: false

customer string
The Warehouse object
{
  "id": "warehouse_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "warehouse_name": "warehouse_name_example",
  "company": "Example Corp",
  "disabled": false,
  "account": "account_example",
  "email_id": "user@example.com",
  "phone_no": "phone_no_example",
  "mobile_no": "mobile_no_example",
  "address_line_1": "address_line_1_example",
  "address_line_2": "address_line_2_example",
  "city": "city_example",
  "state": "state_example",
  "pin": "pin_example",
  "parent_warehouse": "parent_warehouse_example",
  "warehouse_type": "warehouse_type_example",
  "default_in_transit_warehouse": "default_in_transit_warehouse_example",
  "is_rejected_warehouse": false,
  "customer": "customer_example"
}
GET /api/stock/warehouse/{id}

Retrieve a warehouse

Retrieves the details of an existing warehouse. Supply the unique warehouse ID that was returned from a previous request.

Path parameters

id string required

The identifier of the warehouse to retrieve.

Returns

Returns the warehouse object if a valid identifier was provided.

GET /api/stock/warehouse/{id}
curl https://api.overplane.dev/api/stock/warehouse/warehouse_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "warehouse_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "warehouse_name": "warehouse_name_example",
  "company": "Example Corp",
  "disabled": false,
  "account": "account_example",
  "email_id": "user@example.com",
  "phone_no": "phone_no_example",
  "mobile_no": "mobile_no_example",
  "address_line_1": "address_line_1_example",
  "address_line_2": "address_line_2_example",
  "city": "city_example",
  "state": "state_example",
  "pin": "pin_example",
  "parent_warehouse": "parent_warehouse_example",
  "warehouse_type": "warehouse_type_example",
  "default_in_transit_warehouse": "default_in_transit_warehouse_example",
  "is_rejected_warehouse": false,
  "customer": "customer_example"
}
GET /api/stock/warehouse

List all warehouses

Returns a list of warehouses. 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 warehouse objects.

GET /api/stock/warehouse
curl https://api.overplane.dev/api/stock/warehouse \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "warehouse_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "parent_id": null,
      "is_group": false,
      "warehouse_name": "warehouse_name_example",
      "company": "Example Corp",
      "disabled": false,
      "account": "account_example",
      "email_id": "user@example.com",
      "phone_no": "phone_no_example",
      "mobile_no": "mobile_no_example",
      "address_line_1": "address_line_1_example",
      "address_line_2": "address_line_2_example",
      "city": "city_example",
      "state": "state_example",
      "pin": "pin_example",
      "parent_warehouse": "parent_warehouse_example",
      "warehouse_type": "warehouse_type_example",
      "default_in_transit_warehouse": "default_in_transit_warehouse_example",
      "is_rejected_warehouse": false,
      "customer": "customer_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/stock/warehouse

Create a warehouse

Creates a new warehouse object.

Body parameters

parent_id string
is_group boolean

Default: false

warehouse_name string required
company string required
disabled boolean

Default: false

account string
email_id string
phone_no string
mobile_no string
address_line_1 string
address_line_2 string
city string
state string
pin string
parent_warehouse string
warehouse_type string
default_in_transit_warehouse string
is_rejected_warehouse boolean

Default: false

customer string

Returns

Returns the newly created warehouse object if the call succeeded.

POST /api/stock/warehouse
curl https://api.overplane.dev/api/stock/warehouse \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"warehouse_name":"warehouse_name_example","company":"Example Corp"}'
Response
{
  "id": "warehouse_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "warehouse_name": "warehouse_name_example",
  "company": "Example Corp",
  "disabled": false,
  "account": "account_example",
  "email_id": "user@example.com",
  "phone_no": "phone_no_example",
  "mobile_no": "mobile_no_example",
  "address_line_1": "address_line_1_example",
  "address_line_2": "address_line_2_example",
  "city": "city_example",
  "state": "state_example",
  "pin": "pin_example",
  "parent_warehouse": "parent_warehouse_example",
  "warehouse_type": "warehouse_type_example",
  "default_in_transit_warehouse": "default_in_transit_warehouse_example",
  "is_rejected_warehouse": false,
  "customer": "customer_example"
}
PATCH /api/stock/warehouse/{id}

Update a warehouse

Updates the specified warehouse 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 warehouse to update.

Body parameters

parent_id string
is_group boolean

Default: false

warehouse_name string
company string
disabled boolean

Default: false

account string
email_id string
phone_no string
mobile_no string
address_line_1 string
address_line_2 string
city string
state string
pin string
parent_warehouse string
warehouse_type string
default_in_transit_warehouse string
is_rejected_warehouse boolean

Default: false

customer string

Returns

Returns the updated warehouse object.

PATCH /api/stock/warehouse/{id}
curl https://api.overplane.dev/api/stock/warehouse/warehouse_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"is_group":false}'
Response
{
  "id": "warehouse_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "warehouse_name": "warehouse_name_example",
  "company": "Example Corp",
  "disabled": false,
  "account": "account_example",
  "email_id": "user@example.com",
  "phone_no": "phone_no_example",
  "mobile_no": "mobile_no_example",
  "address_line_1": "address_line_1_example",
  "address_line_2": "address_line_2_example",
  "city": "city_example",
  "state": "state_example",
  "pin": "pin_example",
  "parent_warehouse": "parent_warehouse_example",
  "warehouse_type": "warehouse_type_example",
  "default_in_transit_warehouse": "default_in_transit_warehouse_example",
  "is_rejected_warehouse": false,
  "customer": "customer_example"
}
DELETE /api/stock/warehouse/{id}

Delete a warehouse

Permanently deletes a warehouse. This cannot be undone.

Path parameters

id string required

The identifier of the warehouse to delete.

Returns

Returns a confirmation that the warehouse has been deleted.

DELETE /api/stock/warehouse/{id}
curl https://api.overplane.dev/api/stock/warehouse/warehouse_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "warehouse_abc123",
  "deleted": true
}
GET /api/stock/warehouse/{id}/children

Get children

Returns the direct children of the specified node in the tree.

Path parameters

id string required

The identifier of the warehouse to act on.

Returns

A list of direct child objects.

GET /api/stock/warehouse/{id}/children
curl https://api.overplane.dev/api/stock/warehouse/warehouse_abc123/children \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "warehouse_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "warehouse_name": "warehouse_name_example",
  "company": "Example Corp",
  "disabled": false,
  "account": "account_example",
  "email_id": "user@example.com",
  "phone_no": "phone_no_example",
  "mobile_no": "mobile_no_example",
  "address_line_1": "address_line_1_example",
  "address_line_2": "address_line_2_example",
  "city": "city_example",
  "state": "state_example",
  "pin": "pin_example",
  "parent_warehouse": "parent_warehouse_example",
  "warehouse_type": "warehouse_type_example",
  "default_in_transit_warehouse": "default_in_transit_warehouse_example",
  "is_rejected_warehouse": false,
  "customer": "customer_example"
}
GET /api/stock/warehouse/{id}/ancestors

Get ancestors

Returns all ancestors from the immediate parent up to the root of the tree.

Path parameters

id string required

The identifier of the warehouse to act on.

Returns

A list of ancestor objects from parent to root.

GET /api/stock/warehouse/{id}/ancestors
curl https://api.overplane.dev/api/stock/warehouse/warehouse_abc123/ancestors \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "warehouse_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "warehouse_name": "warehouse_name_example",
  "company": "Example Corp",
  "disabled": false,
  "account": "account_example",
  "email_id": "user@example.com",
  "phone_no": "phone_no_example",
  "mobile_no": "mobile_no_example",
  "address_line_1": "address_line_1_example",
  "address_line_2": "address_line_2_example",
  "city": "city_example",
  "state": "state_example",
  "pin": "pin_example",
  "parent_warehouse": "parent_warehouse_example",
  "warehouse_type": "warehouse_type_example",
  "default_in_transit_warehouse": "default_in_transit_warehouse_example",
  "is_rejected_warehouse": false,
  "customer": "customer_example"
}
GET /api/stock/warehouse/{id}/descendants

Get descendants

Returns all descendants of the specified node in the tree.

Path parameters

id string required

The identifier of the warehouse to act on.

Returns

A list of all descendant objects.

GET /api/stock/warehouse/{id}/descendants
curl https://api.overplane.dev/api/stock/warehouse/warehouse_abc123/descendants \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "warehouse_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "parent_id": null,
  "is_group": false,
  "warehouse_name": "warehouse_name_example",
  "company": "Example Corp",
  "disabled": false,
  "account": "account_example",
  "email_id": "user@example.com",
  "phone_no": "phone_no_example",
  "mobile_no": "mobile_no_example",
  "address_line_1": "address_line_1_example",
  "address_line_2": "address_line_2_example",
  "city": "city_example",
  "state": "state_example",
  "pin": "pin_example",
  "parent_warehouse": "parent_warehouse_example",
  "warehouse_type": "warehouse_type_example",
  "default_in_transit_warehouse": "default_in_transit_warehouse_example",
  "is_rejected_warehouse": false,
  "customer": "customer_example"
}