Warehouse
Get Warehouse

Get Warehouse

The Get Warehouse endpoint allows you to get detail of individual pickup address or warehouse in the Gratero system.

Parameters

No parameters are required to get warehouse details.

Example

Response

JSON
{
  "success": true,
  "id": 12,
  "warehouse_name": "Krishna Warehouse",
  "company_name": "Acme Corp",
  "address_line_1": "70/114 Opp. MTS Tower, Ahibaranpur",
  "address_line_2": "Triveni Nagar",
  "is_active": true,
  "city": "Lucknow",
  "state": "Uttar Pradesh",
  "pincode": 226020,
  "country": "India",
  "mobile": "9999999999",
  "email": "email@example.com",
  "gst_number": "",
  "created_at": "2024-11-16T16:00:12.752Z",
  "updated_at": "2024-11-16T16:00:12.752Z",
}

Code

import { Instance } from "gratero";
 
const gratero = new Instance({
  api_key: "YOUR_API_KEY",
  secret_key: "YOUR_SECRET_KEY",
  environment: 'test'
});
 
gratero.warehouse.fetch({
    id: 12
}).then(data => console.log(data))
  .catch(error => console.log(error))