Warehouses
This API allows developers to create a new warehouse, edit the current warehouse, and retrieve information on all warehouses.
Get Warehouse Information
This API allows you to retrieve information about all existing warehouses.
Endpoint
get/v1/partner/warehouses
Request
Example
curl --request GET \
--url https://api.mysupership.vn/v1/partner/warehouses \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Access-Token>'
Response
Returned Result
Field | Type | Description |
---|---|---|
code | String | Warehouse Code. For example: W1BZE00005. |
name | String | Warehouse Name. For example: Kho Bàu Cát. |
address | String | Warehouse Address. For example: 37 Bàu Cát 1. |
formatted_address | String | Full Address of the Warehouse. For example: 37 Bàu Cát 1, Phường 14, Quận Tân Bình, Thành phố Hồ Chí Minh. |
status | String | Warehouse Status. For example: 1. Possible values: - Active: 1. - Inactive: 2. |
status_name | String | Name of the Warehouse Status. |
primary | String | Primary Warehouse Configuration. For example: 2. Possible values: - Default: 1. - Normal: 2. |
primary_name | String | Name of the Primary Warehouse Configuration. |
created_at | String | - Warehouse Creation Time. For example: 2018-07-03T17:18:29+07:00. - Format ISO 8601 |
updated_at | String | - Warehouse Update Time. For example: 2018-07-03T17:18:29+07:00. - Format ISO 8601 |
Example
{
"status": "Success",
"results": [
{
"code": "WCQ1I07047",
"name": "Kho Hoàng Nam",
"address": "47 Huỳnh Văn Bánh",
"formatted_address": "47 Huỳnh Văn Bánh, Phường 13, Quận Tân Bình, Thành phố Hồ Chí Minh",
"status": "1",
"status_name": "Hoạt Động",
"primary": "2",
"primary_name": "Kho Thường",
"created_at": "2018-08-14T03:35:58+07:00",
"updated_at": "2018-08-14T03:44:43+07:00"
},
{
"code": "WLKGT07050",
"name": "Kho Hbt",
"address": "47 Lê Lợi",
"formatted_address": "47 Lê Lợi, Phường Thanh Trì, Quận Hoàng Mai, Thành phố Hà Nội",
"status": "1",
"status_name": "Hoạt Động",
"primary": "1",
"primary_name": "Kho Mặc Định",
"created_at": "2018-08-14T03:44:43+07:00",
"updated_at": "2018-08-14T04:15:48+07:00"
}
]
}
Create Warehouse
This API allows you to create a new warehouse.
Endpoint
post/v1/partner/warehouses/create
Request
Parameters
Field | Required | Type | Description |
---|---|---|---|
name | Yes | String | Name of the warehouse. For example: Kho Bàu Cát. |
phone | Yes | String | Contact phone number. For example: 0989999888. |
contact | Yes | String | Name of the contact person. For example: Trần Ngọc Minh. |
address | Yes | String | Address of the warehouse. For example: 56 Trương Công Định. |
province | Yes | String | Name of the province/city. For example: Thành phố Hồ Chí Minh. |
district | Yes | String | Name of the district. For example: Quận Tân Bình. |
commune | Yes | String | Name of the commune/ward. For example: Phường 14. |
primary | Yes | String | Default warehouse configuration. For example: 2. Possible values: - Default: 1. - Normal: 2. |
partner | No | String | Secret Code. For large E-commerce partners with SuperShip. |
Example
curl --request POST \
--url https://api.mysupership.vn/v1/partner/warehouses/create \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Kho HM",
"phone": "0989999888",
"contact": "Trần Cao Cường",
"address": "47 Lê Lợi",
"province": "Thành phố Hồ Chí Minh",
"district": "Quận Tân Bình",
"commune": "Phường 14",
"primary": "1"
}'
Response
Returned Result
Field | Type | Description |
---|---|---|
code | String | Warehouse Code. For example: W1BZE00005. |
name | String | Warehouse Name. For example: Kho Bàu Cát. |
address | String | Warehouse Address. For example: 37 Bàu Cát 1. |
formatted_address | String | Full Address of the Warehouse. For example: 37 Bàu Cát 1, Phường 14, Quận Tân Bình, Thành phố Hồ Chí Minh. |
status | String | Warehouse Status. For example: 1. Possible values: - Active: 1. - Inactive: 2. |
status_name | String | Name of the Warehouse Status. |
primary | String | Primary Warehouse Configuration. For example: 2. Possible values: - Default: 1. - Normal: 2. |
primary_name | String | Name of the Primary Warehouse Configuration. |
created_at | String | - Warehouse Creation Time. For example: 2018-07-03T17:18:29+07:00. - Format ISO 8601 |
updated_at | String | - Warehouse Update Time. For example: 2018-08-14T03:44:43+07:00. - Format ISO 8601 |
Example
{
"status": "Success",
"results": {
"code": "WLKGT07050",
"name": "Kho HBT",
"address": "47 Lê Lợi",
"formatted_adress": "47 Lê Lợi, Phường Thanh Trì, Quận Hoàng Mai, Thành phố Hà Nội",
"status": "1",
"status_name": "Hoạt Động",
"primary": "1",
"primary_name": "Kho Mặc Định",
"created_at": "2018-08-14T03:44:43+07:00",
"updated_at": "2018-08-14T03:44:43+07:00"
}
}
Edit Warehouse
This API allows you to edit an existing warehouse.
NOTE
To change the values of Address, Ward, District, Province/City, please create a new Warehouse.
Endpoint
post/v1/partner/warehouses/update
Request
Parameters
Field | Required | Type | Description |
---|---|---|---|
code | Yes | String | Warehouse Code. For example: WLKGT07050. |
name | Yes | String | Warehouse Name. For example: Kho Bàu Cát. |
phone | Yes | String | Contact phone number. For example: 0989999888. |
contact | Yes | String | Name of the contact person. For example: Trần Ngọc Minh. |
Example
curl --request POST \
--url https://api.mysupership.vn/v1/partner/warehouses/update \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
"code": "WLKGT07050",
"name": "Kho Hbt",
"phone": "0989999888",
"contact": "Dương Mạnh Quân"
}'
Response
Returned Result
Field | Type | Description |
---|---|---|
code | String | Warehouse Code. For example: WLKGT07050. |
diff | Object | The fields appearing in this object are the values that have been successfully updated. For example: the field name has been updated from Trần Cao Cường to Lê Nam Quân. |
updated_at | String | - Update time. For example: 2018-08-14T15:03:59+07:00. - Format ISO 8601 |
Example
{
"status": "Success",
"results": {
"code": "WLKGT07050",
"diff": {
"name": "Kho Ba Đình",
"contact": "Lê Nam Quân"
},
"updated_at": "2018-08-14T15:03:59+07:00"
}
}