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

FieldTypeDescription
codeStringWarehouse Code. For example: W1BZE00005.
nameStringWarehouse Name. For example: Kho Bàu Cát.
addressStringWarehouse Address. For example: 37 Bàu Cát 1.
formatted_addressStringFull 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.
statusStringWarehouse Status. For example: 1.
Possible values:
- Active: 1.
- Inactive: 2.
status_nameStringName of the Warehouse Status.
primaryStringPrimary Warehouse Configuration. For example: 2.
Possible values:
- Default: 1.
- Normal: 2.
primary_nameStringName of the Primary Warehouse Configuration.
created_atString- Warehouse Creation Time. For example: 2018-07-03T17:18:29+07:00.
- Format ISO 8601
updated_atString- 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

FieldRequiredTypeDescription
nameYesStringName of the warehouse. For example: Kho Bàu Cát.
phoneYesStringContact phone number. For example: 0989999888.
contactYesStringName of the contact person. For example: Trần Ngọc Minh.
addressYesStringAddress of the warehouse. For example: 56 Trương Công Định.
provinceYesStringName of the province/city. For example: Thành phố Hồ Chí Minh.
districtYesStringName of the district. For example: Quận Tân Bình.
communeYesStringName of the commune/ward. For example: Phường 14.
primaryYesStringDefault warehouse configuration. For example: 2.
Possible values:
- Default: 1.
- Normal: 2.
partnerNoStringSecret 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

FieldTypeDescription
codeStringWarehouse Code. For example: W1BZE00005.
nameStringWarehouse Name. For example: Kho Bàu Cát.
addressStringWarehouse Address. For example: 37 Bàu Cát 1.
formatted_addressStringFull 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.
statusStringWarehouse Status. For example: 1.
Possible values:
- Active: 1.
- Inactive: 2.
status_nameStringName of the Warehouse Status.
primaryStringPrimary Warehouse Configuration. For example: 2.
Possible values:
- Default: 1.
- Normal: 2.
primary_nameStringName of the Primary Warehouse Configuration.
created_atString- Warehouse Creation Time. For example: 2018-07-03T17:18:29+07:00.
- Format ISO 8601
updated_atString- 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

FieldRequiredTypeDescription
codeYesStringWarehouse Code. For example: WLKGT07050.
nameYesStringWarehouse Name. For example: Kho Bàu Cát.
phoneYesStringContact phone number. For example: 0989999888.
contactYesStringName 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

FieldTypeDescription
codeStringWarehouse Code. For example: WLKGT07050.
diffObjectThe 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_atString- 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"
    }
}
Last Updated: 5/6/2023, 4:28:03 PM