---
title: "Create a fulfillment service location"
description: "Create a fulfillment service location."
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/order/fulfillment-service/create-fulfillment-location'
  md: 'https://developer.shopline.com/docs/admin-rest-api/order/fulfillment-service/create-fulfillment-location.md'
---
# Create a fulfillment service location

Create a fulfillment service location.

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_fulfillment_service`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
POST /fulfillment_service_location/create.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `write_fulfillment_service`

## Request

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

### Request Body

* `location`

  object

  The information about the fulfillment service location.

  * `address1`

    string

    The first line of the location. This typically includes information such as the street address or a post office box number.

  * `address2`

    string

    The second line of the location. This typically includes information such as an apartment, suite, or unit number.

  * `city`

    string

    The city.

  * `city_code`

    string

    The code for the city.

  * `country`

    string

    The country or region.

  * `country_code`

    string

    A two-letter country or region code that follows the [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html) standard. 

  * `inventory_management`

    boolean

    Whether the product inventory for the location is managed by the fulfillment app.
    - `true`: Managed by the fulfillment app. 
    - `false`: Managed by the SHOPLINE Admin.
    
    Default value: `true`

  * `name`

    string

    The location's name.

  * `permits_sku_sharing`

    boolean

    Whether the product inventory for the location is shared by other locations.
    - `true`: The product inventory for the location is shared by other locations.
    - `false`: The product inventory for the location is not shared by other locations.
    
    Default value: `false`

  * `phone`

    string

    The merchant's phone number.

  * `phone_code`

    string

    The international dialing code for the phone number.

  * `province`

    string

    The state or province.

  * `province_code`

    string

    The code for the state or province.

  * `zip`

    string

    The postal code of the location.

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `location`

  object

  The information about the fulfillment service location.

  * `active`

    boolean

    Whether the location is enabled.
    - `true`: Enabled
    - `false`: Not enabled

  * `address1`

    string

    The first line of the location. This typically includes information such as the street address or a post office box number.

  * `address2`

    string

    The second line of the location. This typically includes information such as an apartment, suite, or unit number.

  * `city`

    string

    The city.

  * `city_code`

    string

    The code for the city.

  * `country`

    string

    The country or region.

  * `country_code`

    string

    A two-letter country or region code that follows the [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html) standard.

  * `create_at`

    string

    The date and time when the location was created. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).

  * `id`

    string

    The unique identifier for the location.

  * `inventory_management`

    boolean

    Whether the product inventory for the location is managed by the fulfillment app.
    - `true`: Managed by the fulfillment app.
    - `false`: Managed by the SHOPLINE Admin.

  * `is_default`

    boolean

    Whether the location is the default location.
    - `true`: The location is the default location.
    - `false`: The location is not the default location.

  * `legacy`

    boolean

    Whether the location is exclusive to the fulfillment app.
    - `true`: The location is exclusive to the fulfillment app.
    - `false`: The location is not exclusive to the fulfillment app.

  * `name`

    string

    The location's name.

  * `permits_sku_sharing`

    boolean

    Whether the product inventory for the location is shared by other locations.
    - `true`: The product inventory for the location is shared by other locations.
    - ` false`: The product inventory for the location is not shared by other locations.

  * `phone`

    string

    The merchant's phone number.

  * `phone_code`

    string

    The international dialing code for the phone number.

  * `province`

    string

    The state or province.

  * `province_code`

    string

    The code for the state or province.

  * `update_at`

    string

    The date and time when the location was updated. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). 

  * `zip`

    string

    The postal code of the location.


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "tags": [
    "Create a fulfillment service location"
  ],
  "description": "Create a fulfillment service location.",
  "externalDocs": {
    "description": "Permission point used by the interface is `write_fulfillment_service` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": "| Error Code | HTTP Status Code | Error Description |\n|------------|------------------|-------------------|\n| PERMISSION_DENIED | 403 | You do not have permission to access. |\n| SUCCESS | 200 | request success |\n| SYSTEM_ERROR | 500 | system error |\n"
  },
  "operationId": "EU4Xb0F7",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "name": "body",
          "type": "object",
          "properties": {
            "location": {
              "name": "location",
              "description": "The information about the fulfillment service location.",
              "type": "object",
              "properties": {
                "address1": {
                  "name": "address1",
                  "description": "The first line of the location. This typically includes information such as the street address or a post office box number.",
                  "type": "string",
                  "example": "126 York Street"
                },
                "address2": {
                  "name": "address2",
                  "description": "The second line of the location. This typically includes information such as an apartment, suite, or unit number.",
                  "type": "string",
                  "example": "Unit 42"
                },
                "city": {
                  "name": "city",
                  "description": "The city.",
                  "type": "string",
                  "example": "Ottawa"
                },
                "city_code": {
                  "name": "city_code",
                  "description": "The code for the city.",
                  "type": "string",
                  "example": "120100"
                },
                "country": {
                  "name": "country",
                  "description": "The country or region.",
                  "type": "string",
                  "example": "Canada"
                },
                "country_code": {
                  "name": "country_code",
                  "description": "A two-letter country or region code that follows the [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html) standard. ",
                  "type": "string",
                  "example": "CA"
                },
                "inventory_management": {
                  "name": "inventory_management",
                  "description": "Whether the product inventory for the location is managed by the fulfillment app.\n- `true`: Managed by the fulfillment app. \n- `false`: Managed by the SHOPLINE Admin.\n\nDefault value: `true`",
                  "type": "boolean"
                },
                "name": {
                  "name": "name",
                  "description": "The location's name.",
                  "type": "string",
                  "example": "Ottawa Store"
                },
                "permits_sku_sharing": {
                  "name": "permits_sku_sharing",
                  "description": "Whether the product inventory for the location is shared by other locations.\n- `true`: The product inventory for the location is shared by other locations.\n- `false`: The product inventory for the location is not shared by other locations.\n\nDefault value: `false`",
                  "type": "boolean"
                },
                "phone": {
                  "name": "phone",
                  "description": "The merchant's phone number.",
                  "type": "string",
                  "example": "18883290139"
                },
                "phone_code": {
                  "name": "phone_code",
                  "description": "The international dialing code for the phone number.",
                  "type": "string",
                  "example": "0010"
                },
                "province": {
                  "name": "province",
                  "description": "The state or province.",
                  "type": "string",
                  "example": "Ontario"
                },
                "province_code": {
                  "name": "province_code",
                  "description": "The code for the state or province.",
                  "type": "string",
                  "example": "2400011"
                },
                "zip": {
                  "name": "zip",
                  "description": "The postal code of the location.",
                  "type": "string",
                  "example": "A1B 2C3"
                }
              },
              "required": [
                "zip",
                "country_code",
                "name",
                "phone"
              ],
              "example": {
                "address1": "126 York Street",
                "address2": "Unit 42",
                "city": "Ottawa",
                "city_code": "120100",
                "country": "Canada",
                "country_code": "CA",
                "inventory_management": null,
                "name": "Ottawa Store",
                "permits_sku_sharing": null,
                "phone": "18883290139",
                "phone_code": "0010",
                "province": "Ontario",
                "province_code": "2400011",
                "zip": "A1B 2C3"
              }
            }
          },
          "required": [
            "location"
          ],
          "example": {
            "location": {
              "address1": "126 York Street",
              "address2": "Unit 42",
              "city": "Ottawa",
              "city_code": "120100",
              "country": "Canada",
              "country_code": "CA",
              "inventory_management": null,
              "name": "Ottawa Store",
              "permits_sku_sharing": null,
              "phone": "18883290139",
              "phone_code": "0010",
              "province": "Ontario",
              "province_code": "2400011",
              "zip": "A1B 2C3"
            }
          }
        },
        "examples": {
          "Create a fulfillment service location": {
            "description": "Create a fulfillment service location",
            "value": {
              "location": {
                "address1": "2800 E Observatory Rd",
                "address2": "Griffith Observatory",
                "city": "Los Angeles",
                "city_code": "",
                "country": "United States",
                "country_code": "US",
                "inventory_management": true,
                "name": "Ottawa Store",
                "permits_sku_sharing": true,
                "phone": "213***0199",
                "phone_code": "001",
                "province": "California",
                "province_code": "4200006",
                "zip": "90027"
              }
            }
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "location": {
                "name": "location",
                "description": "The information about the fulfillment service location.",
                "type": "object",
                "properties": {
                  "active": {
                    "name": "active",
                    "description": "Whether the location is enabled.\n- `true`: Enabled\n- `false`: Not enabled",
                    "type": "boolean"
                  },
                  "address1": {
                    "name": "address1",
                    "description": "The first line of the location. This typically includes information such as the street address or a post office box number.",
                    "type": "string",
                    "example": "126 York Street"
                  },
                  "address2": {
                    "name": "address2",
                    "description": "The second line of the location. This typically includes information such as an apartment, suite, or unit number.",
                    "type": "string",
                    "example": "Unit 42"
                  },
                  "city": {
                    "name": "city",
                    "description": "The city.",
                    "type": "string",
                    "example": "Ottawa"
                  },
                  "city_code": {
                    "name": "city_code",
                    "description": "The code for the city.",
                    "type": "string",
                    "example": "120100"
                  },
                  "country": {
                    "name": "country",
                    "description": "The country or region.",
                    "type": "string",
                    "example": "Canada"
                  },
                  "country_code": {
                    "name": "country_code",
                    "description": "A two-letter country or region code that follows the [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html) standard.",
                    "type": "string",
                    "example": "CA"
                  },
                  "create_at": {
                    "name": "create_at",
                    "description": "The date and time when the location was created. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).",
                    "type": "string",
                    "example": "2021-08-16T08:27:57+00:00"
                  },
                  "id": {
                    "name": "id",
                    "description": "The unique identifier for the location.",
                    "type": "string",
                    "example": "5668167071852661850"
                  },
                  "inventory_management": {
                    "name": "inventory_management",
                    "description": "Whether the product inventory for the location is managed by the fulfillment app.\n- `true`: Managed by the fulfillment app.\n- `false`: Managed by the SHOPLINE Admin.",
                    "type": "boolean"
                  },
                  "is_default": {
                    "name": "is_default",
                    "description": "Whether the location is the default location.\n- `true`: The location is the default location.\n- `false`: The location is not the default location.",
                    "type": "boolean"
                  },
                  "legacy": {
                    "name": "legacy",
                    "description": "Whether the location is exclusive to the fulfillment app.\n- `true`: The location is exclusive to the fulfillment app.\n- `false`: The location is not exclusive to the fulfillment app.",
                    "type": "boolean"
                  },
                  "name": {
                    "name": "name",
                    "description": "The location's name.",
                    "type": "string",
                    "example": "Ottawa Store"
                  },
                  "permits_sku_sharing": {
                    "name": "permits_sku_sharing",
                    "description": "Whether the product inventory for the location is shared by other locations.\n- `true`: The product inventory for the location is shared by other locations.\n- ` false`: The product inventory for the location is not shared by other locations.",
                    "type": "boolean",
                    "example": false
                  },
                  "phone": {
                    "name": "phone",
                    "description": "The merchant's phone number.",
                    "type": "string",
                    "example": "18883290139"
                  },
                  "phone_code": {
                    "name": "phone_code",
                    "description": "The international dialing code for the phone number.",
                    "type": "string",
                    "example": "0010"
                  },
                  "province": {
                    "name": "province",
                    "description": "The state or province.",
                    "type": "string",
                    "example": "Ontario"
                  },
                  "province_code": {
                    "name": "province_code",
                    "description": "The code for the state or province.",
                    "type": "string",
                    "example": "2400011"
                  },
                  "update_at": {
                    "name": "update_at",
                    "description": "The date and time when the location was updated. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). ",
                    "type": "string",
                    "example": "2021-08-16T08:27:57+00:00"
                  },
                  "zip": {
                    "name": "zip",
                    "description": "The postal code of the location.",
                    "type": "string",
                    "example": "A1B 2C3"
                  }
                },
                "example": {
                  "active": null,
                  "address1": "126 York Street",
                  "address2": "Unit 42",
                  "city": "Ottawa",
                  "city_code": "120100",
                  "country": "Canada",
                  "country_code": "CA",
                  "create_at": "2021-08-16T08:27:57+00:00",
                  "id": "5668167071852661850",
                  "inventory_management": null,
                  "is_default": null,
                  "legacy": null,
                  "name": "Ottawa Store",
                  "permits_sku_sharing": false,
                  "phone": "18883290139",
                  "phone_code": "0010",
                  "province": "Ontario",
                  "province_code": "2400011",
                  "update_at": "2021-08-16T08:27:57+00:00",
                  "zip": "A1B 2C3"
                }
              }
            },
            "example": {
              "location": {
                "active": null,
                "address1": "126 York Street",
                "address2": "Unit 42",
                "city": "Ottawa",
                "city_code": "120100",
                "country": "Canada",
                "country_code": "CA",
                "create_at": "2021-08-16T08:27:57+00:00",
                "id": "5668167071852661850",
                "inventory_management": null,
                "is_default": null,
                "legacy": null,
                "name": "Ottawa Store",
                "permits_sku_sharing": false,
                "phone": "18883290139",
                "phone_code": "0010",
                "province": "Ontario",
                "province_code": "2400011",
                "update_at": "2021-08-16T08:27:57+00:00",
                "zip": "A1B 2C3"
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          },
          "examples": {
            "Create a fulfillment service location": {
              "description": "Create a fulfillment service location",
              "value": {
                "location": {
                  "active": true,
                  "address1": "2800 E Observatory Rd",
                  "address2": "Griffith Observatory",
                  "city": "Los Angeles",
                  "city_code": "",
                  "country": "United States",
                  "country_code": "US",
                  "create_at": "2026-07-15T15:28:17+08:00",
                  "id": "7613037372894658699",
                  "inventory_management": true,
                  "is_default": false,
                  "legacy": true,
                  "name": "Ottawa Store",
                  "permits_sku_sharing": true,
                  "phone": "213***0199",
                  "phone_code": "001",
                  "province": "California",
                  "province_code": "4200006",
                  "update_at": "2026-07-15T15:28:17+08:00",
                  "zip": "90027"
                }
              }
            }
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "post",
  "path": "/fulfillment_service_location/create.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Create a fulfillment service location",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_fulfillment_service"
  ]
}
```