Create a location
GraphQL
mutation CreateLocation($input: LocationInput!) {
CreateLocation(input: $input) {
id
label
active
type
shipping_cost
phone
replace_company_name
address { id label country address_1 postal_code city }
}
}
JSON
{
"input": {
"label": "New Warehouse",
"type": "warehouse",
"shipping_cost": 7.50,
"phone": "+33 1 23 45 67 91",
"replace_company_name": false,
"address": {
"label": "Warehouse Address",
"country": "FR",
"address_1": "15 Industrial Street",
"postal_code": "75012",
"city": "Paris"
}
}
}
JSON
{
"data": {
"CreateLocation": {
"id": 100003,
"label": "New Warehouse",
"active": true,
"type": "warehouse",
"shipping_cost": 7.50,
"phone": "+33 1 23 45 67 91",
"replace_company_name": false,
"address": {
"id": 501,
"label": "Warehouse Address",
"country": "FR",
"address_1": "15 Industrial Street",
"postal_code": "75012",
"city": "Paris"
}
}
}
}
Update a location
id - ID Id of the location
GraphQL
mutation UpdateLocation($id: ID!, $input: LocationInput!) {
UpdateLocation(id: $id, input: $input) {
id
label
active
type
shipping_cost
phone
replace_company_name
address { id label country address_1 postal_code city }
}
}
JSON
{
"id": 100003,
"input": {
"label": "Updated Warehouse",
"shipping_cost": 8.00,
"phone": "+33 1 23 45 67 92"
}
}
JSON
{
"data": {
"UpdateLocation": {
"id": 100003,
"label": "Updated Warehouse",
"active": true,
"type": "warehouse",
"shipping_cost": 8.00,
"phone": "+33 1 23 45 67 92",
"replace_company_name": false,
"address": {
"id": 501,
"label": "Warehouse Address",
"country": "FR",
"address_1": "15 Industrial Street",
"postal_code": "75012",
"city": "Paris"
}
}
}
}
Delete a location
id - ID Id of the location
GraphQL
mutation DeleteLocation($id: ID!, $input: DeleteLocationInput!) {
DeleteLocation(id: $id, input: $input)
}
JSON
{
"id": 100003,
"input": {
"backup_location_id": 100001,
"stock_transferred": true
}
}
JSON
{
"data": { "DeleteLocation": true }
}
Delete multiple locations
ids - [ID] List of location identifiers
GraphQL
mutation DeleteLocations($ids: [ID!]!, $input: DeleteLocationInput!) {
DeleteLocations(ids: $ids, input: $input)
}
JSON
{
"ids": [100003, 100004],
"input": {
"backup_location_id": 100001,
"stock_transferred": true
}
}
JSON
{
"data": { "DeleteLocations": true }
}
Disable a location
id - ID Id of the location
GraphQL
mutation DisableLocation($id: ID!) {
DisableLocation(id: $id) {
id
label
active
}
}
JSON
{
"data": {
"DisableLocation": {
"id": 100003,
"label": "Updated Warehouse",
"active": false
}
}
}
Enable a location
id - ID Id of the location
GraphQL
mutation EnableLocation($id: ID!) {
EnableLocation(id: $id) {
id
label
active
}
}
JSON
{
"data": {
"EnableLocation": {
"id": 100003,
"label": "Updated Warehouse",
"active": true
}
}
}
id - ID Identifier (optional)
label - String Label of the location
pdf_description - String Description shown on PDFs for this location
shipping_cost - Float Shipping cost for this location
phone - String Phone number of the location
replace_company_name - Boolean Whether to replace company name in documents
backup_location_id - ID Id of the backup location for stock transfer
stock_transferred - Boolean Whether stock has been transferred to backup location
Value Description storeRetail or storefront location. warehouseStorage and fulfillment location. subcontractorExternal manufacturing or processing location.