shipink-logo-vector-svgDocumentation

Warehouses

Create, list, update, and delete warehouses (sender addresses).

List warehouses

Returns a paginated list of all your warehouses.

GET
/warehouses
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value
limit?integer

Number of items per page

Default10
Range1 <= value <= 100

Response Body

application/json

curl -X GET "https://api.shipink.io/warehouses"
{
  "success": true,
  "meta": {
    "status": 200,
    "message": "orders successfully received",
    "total": 100
  },
  "data": [
    {
      "name": "Main Warehouse",
      "person_name": "John Smith",
      "company": {
        "name": "Example Co. Ltd.",
        "tax_id": "1234567890",
        "tax_office": "Maltepe"
      },
      "phone": {
        "main": "905321234567",
        "work": "",
        "cell": "",
        "code": ""
      },
      "email": {
        "main": "user@example.com",
        "work": ""
      },
      "address": {
        "street": "Example Street No:1",
        "city": "Maltepe",
        "city_code": "TR-34-108146",
        "state": "İstanbul",
        "state_code": "TR-34",
        "zip": "34857",
        "country": "Turkey",
        "country_code": "TR",
        "tax_id": "",
        "external_id": null,
        "status": ""
      },
      "id": "96bfcda0-444f-4750-a673-4ba96bd882d9",
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "default": false,
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z"
    }
  ]
}

Create a warehouse

Creates a new warehouse (sender address).

POST
/warehouses
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

namestring
person_namestring
company?
phone
email?
address

Response Body

application/json

curl -X POST "https://api.shipink.io/warehouses" \  -H "Content-Type: application/json" \  -d '{    "name": "Main Warehouse",    "person_name": "John Smith",    "company": {      "name": "Example Co. Ltd.",      "tax_id": "1234567890"    },    "phone": {      "main": "905321234567"    },    "email": {      "main": "warehouse@example.com"    },    "address": {      "street": "Example Street No:1",      "city": "Maltepe",      "state": "İstanbul",      "zip": "34857",      "country_code": "TR"    }  }'
{
  "name": "Main Warehouse",
  "person_name": "John Smith",
  "company": {
    "name": "Example Co. Ltd.",
    "tax_id": "1234567890",
    "tax_office": "Maltepe"
  },
  "phone": {
    "main": "905321234567",
    "work": "",
    "cell": "",
    "code": ""
  },
  "email": {
    "main": "user@example.com",
    "work": ""
  },
  "address": {
    "street": "Example Street No:1",
    "city": "Maltepe",
    "city_code": "TR-34-108146",
    "state": "İstanbul",
    "state_code": "TR-34",
    "zip": "34857",
    "country": "Turkey",
    "country_code": "TR",
    "tax_id": "",
    "external_id": null,
    "status": ""
  },
  "id": "96bfcda0-444f-4750-a673-4ba96bd882d9",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "default": false,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "deleted_at": "2019-08-24T14:15:22Z"
}

Get a warehouse

Returns the details of the specified warehouse.

GET
/warehouses/{warehouse_id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

warehouse_idstring

Warehouse ID

Formatuuid

Response Body

application/json

curl -X GET "https://api.shipink.io/warehouses/96bfcda0-444f-4750-a673-4ba96bd882d9"
{
  "name": "Main Warehouse",
  "person_name": "John Smith",
  "company": {
    "name": "Example Co. Ltd.",
    "tax_id": "1234567890",
    "tax_office": "Maltepe"
  },
  "phone": {
    "main": "905321234567",
    "work": "",
    "cell": "",
    "code": ""
  },
  "email": {
    "main": "user@example.com",
    "work": ""
  },
  "address": {
    "street": "Example Street No:1",
    "city": "Maltepe",
    "city_code": "TR-34-108146",
    "state": "İstanbul",
    "state_code": "TR-34",
    "zip": "34857",
    "country": "Turkey",
    "country_code": "TR",
    "tax_id": "",
    "external_id": null,
    "status": ""
  },
  "id": "96bfcda0-444f-4750-a673-4ba96bd882d9",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "default": false,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "deleted_at": "2019-08-24T14:15:22Z"
}
Empty

Delete a warehouse

Deletes the specified warehouse.

DELETE
/warehouses/{warehouse_id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

warehouse_idstring

Warehouse ID

Formatuuid

Response Body

application/json

curl -X DELETE "https://api.shipink.io/warehouses/96bfcda0-444f-4750-a673-4ba96bd882d9"
{
  "message": "Operation completed successfully."
}

Update a warehouse

Updates the specified warehouse.

PUT
/warehouses/{warehouse_id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

warehouse_idstring

Warehouse ID

Formatuuid
name?string
person_name?string
company?
phone?
email?
address?

Response Body

application/json

curl -X PUT "https://api.shipink.io/warehouses/96bfcda0-444f-4750-a673-4ba96bd882d9" \  -H "Content-Type: application/json" \  -d '{    "name": "Updated Warehouse Name",    "phone": {      "main": "905321234567"    }  }'
{
  "name": "Main Warehouse",
  "person_name": "John Smith",
  "company": {
    "name": "Example Co. Ltd.",
    "tax_id": "1234567890",
    "tax_office": "Maltepe"
  },
  "phone": {
    "main": "905321234567",
    "work": "",
    "cell": "",
    "code": ""
  },
  "email": {
    "main": "user@example.com",
    "work": ""
  },
  "address": {
    "street": "Example Street No:1",
    "city": "Maltepe",
    "city_code": "TR-34-108146",
    "state": "İstanbul",
    "state_code": "TR-34",
    "zip": "34857",
    "country": "Turkey",
    "country_code": "TR",
    "tax_id": "",
    "external_id": null,
    "status": ""
  },
  "id": "96bfcda0-444f-4750-a673-4ba96bd882d9",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "default": false,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "deleted_at": "2019-08-24T14:15:22Z"
}

How is this guide?