companyLocationCreate
mutation
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Create company location
Arguments
The ID of the company which the company location belongs to.
The input fields to use to create the company location.
Return
Company location information
Error message
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Company location create
Code
{
"companyId": "gid://shopline/Company/6261711218190850599",
"input": {
"billingAddress": {
"address1": "fake street",
"address2": "long three department",
"city": "Ottawa",
"countryCode": "CA",
"phone": "002121445678",
"zip": "53118"
},
"billingSameAsShipping": false,
"buyerExperienceConfiguration": {
"editableShippingAddress": true,
"paymentTermsTemplateId": "gid://shopline/PaymentTermsTemplate/4"
},
"name": "Top catagory location",
"shippingAddress": {
"address1": "funny street",
"address2": "golden 3 department",
"city": "Ottawa",
"countryCode": "CA",
"phone": "002121440678",
"zip": "53118"
},
"taxExemptions": [{"countryCode":"US","provinceGCodeList":["AK"]}]
}
}
Response
{
"data": {
"companyLocationCreate": {
"companyLocation": {
"shippingAddress": {
"address2": "golden 3 department",
"city": "Ottawa",
"country": null,
"createdAt": "2024-05-14T10:26:15.653Z",
"address1": "funny street",
"countryCode": "CA",
"id": "gid://shopline/CompanyAddress/6465171767376224551",
"province": null,
"zip": "53118"
},
"billingAddress": {
"address1": "fake street",
"city": "Ottawa",
"country": null,
"countryCode": "CA",
"createdAt": "2024-05-14T10:26:15.695Z",
"id": "gid://shopline/CompanyAddress/6465171768080867624",
"province": null,
"address2": "long three department",
"zip": "53118"
},
"company": {
"id": "gid://shopline/Company/6261711218190850599",
"mainContact": null,
"name": "Big bom"
},
"id": "gid://shopline/CompanyLocation/6465171766436700454",
"name": "Top catagory location"
},
"userErrors": []
}
},
"extensions": {
"dataloader": {
"overall-statistics": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"batchLoadCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"individual-statistics": {
"LD-com.shopline.pixiu.psm.graphql.api.service.ProductQueryGqlService-optionsForLoader": {
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"batchLoadCount": 0,
"cacheHitCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ShopQueryGqlService-maxProductOptions": {
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ShopQueryGqlService-maxProductVariants": {
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0
},
"LD-com.shopline.benefitrights.giftcard.graphql.api.service.ShopQueryGqlService-canCreateGiftCards": {
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-seoLoader": {
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.DescriptionQueryGqlService-get": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.InventoryQueryGqlService-listItemForLoader": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.InventoryQueryGqlService-listLevelByVariantForLoader": {
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0
},
"LD-com.joyy.shopline.soul.appstore.api.service.publication.PublicationQueryGQLService-publicationsForLoader": {
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.ec.merchant.ugc.i18n.api.interfaces.UgcI18nGraphqlApi-getUgcLocaleResources": {
"loadErrorRatio": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-checkHasProductForLoader": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchInvokeCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-checkInCollectionForLoader": {
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0
}
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.CompanyOpenApi@companyLocationCreate",
"dfErrorCode": null,
"dfProtocol": "dubbo",
"dfRootCoordinate": "/companyLocationCreate",
"dfRt": 965
}
],
"graphQLMetrics": {
"merchantId": "4200333804",
"startTimeMillis": 1715682375649,
"storeId": "1671771213310",
"customizedClientIp": "157.119.232.37",
"endParseTimeMillis": 1715682375651,
"includeDeprecatedField": false,
"appKey": "ac46139a45013c6d13b3bdb53ba7b12b2af6d35f",
"countryCode": null,
"fieldCount": 160,
"operation": "MUTATION",
"ratelimitPermits": 0,
"traceId": "50647c6ab8a9c944b337c71fc17ea888",
"languageCode": null,
"loaderCount": 0,
"parseRt": 2,
"deepLevel": 6,
"executionId": "ad2ef1a7-c723-4e43-8ffb-86aed55475b6",
"clientIp": "157.119.232.37",
"includeQuery": false,
"namespace": "admin",
"rt": 978,
"startParseTimeMillis": 1715682375649,
"storePlus": false,
"tenant": "ec20",
"errorFieldsCount": 0,
"successType": "SUCCESS",
"appId": "264149",
"ratelimitRemaining": 0,
"saleChannel": null,
"version": "v20240601"
}
},
"tracing": {
"duration": 978017082,
"endTime": "2024-05-14T10:26:16.627Z",
"execution": {
"resolvers": [
{
"fieldName": "companyLocationCreate",
"parentType": "Mutation",
"path": [
"companyLocationCreate"
],
"returnType": "CompanyLocationCreatePayload",
"startOffset": 8634239,
"duration": 966748323
},
{
"duration": 35609,
"fieldName": "companyLocation",
"parentType": "CompanyLocationCreatePayload",
"path": [
"companyLocationCreate",
"companyLocation"
],
"returnType": "CompanyLocation",
"startOffset": 976052616
},
{
"returnType": "ID",
"startOffset": 976148280,
"duration": 15360,
"fieldName": "id",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"id"
]
},
{
"duration": 11411,
"fieldName": "name",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"name"
],
"returnType": "String",
"startOffset": 976211574
},
{
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress"
],
"returnType": "CompanyAddress",
"startOffset": 976349401,
"duration": 16092,
"fieldName": "billingAddress"
},
{
"returnType": "String",
"startOffset": 976429452,
"duration": 12037,
"fieldName": "address1",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"address1"
]
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"address2"
],
"returnType": "String",
"startOffset": 976462532,
"duration": 9695,
"fieldName": "address2"
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"countryCode"
],
"returnType": "CountryCode",
"startOffset": 976492051,
"duration": 9466,
"fieldName": "countryCode"
},
{
"duration": 29281,
"fieldName": "country",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"country"
],
"returnType": "String",
"startOffset": 976546470
},
{
"fieldName": "createdAt",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"createdAt"
],
"returnType": "Date",
"startOffset": 976596787,
"duration": 11378
},
{
"returnType": "ID",
"startOffset": 976708337,
"duration": 12041,
"fieldName": "id",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"id"
]
},
{
"returnType": "String",
"startOffset": 976740788,
"duration": 10710,
"fieldName": "zip",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"zip"
]
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"city"
],
"returnType": "String",
"startOffset": 976768887,
"duration": 11419,
"fieldName": "city"
},
{
"returnType": "String",
"startOffset": 976797941,
"duration": 11796,
"fieldName": "province",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"province"
]
},
{
"startOffset": 976967908,
"duration": 17595,
"fieldName": "shippingAddress",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress"
],
"returnType": "CompanyAddress"
},
{
"fieldName": "address1",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"address1"
],
"returnType": "String",
"startOffset": 977028629,
"duration": 12338
},
{
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"address2"
],
"returnType": "String",
"startOffset": 977060821,
"duration": 11131,
"fieldName": "address2",
"parentType": "CompanyAddress"
},
{
"fieldName": "countryCode",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"countryCode"
],
"returnType": "CountryCode",
"startOffset": 977091185,
"duration": 11101
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"country"
],
"returnType": "String",
"startOffset": 977140637,
"duration": 9908,
"fieldName": "country"
},
{
"duration": 153845,
"fieldName": "createdAt",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"createdAt"
],
"returnType": "Date",
"startOffset": 977170396
},
{
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"id"
],
"returnType": "ID",
"startOffset": 977386094,
"duration": 9771,
"fieldName": "id",
"parentType": "CompanyAddress"
},
{
"duration": 6714,
"fieldName": "zip",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"zip"
],
"returnType": "String",
"startOffset": 977410809
},
{
"duration": 6911,
"fieldName": "city",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"city"
],
"returnType": "String",
"startOffset": 977429845
},
{
"fieldName": "province",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"province"
],
"returnType": "String",
"startOffset": 977448761,
"duration": 7521
},
{
"duration": 19006,
"fieldName": "company",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"company"
],
"returnType": "Company",
"startOffset": 977594004
},
{
"duration": 7833,
"fieldName": "id",
"parentType": "Company",
"path": [
"companyLocationCreate",
"companyLocation",
"company",
"id"
],
"returnType": "ID",
"startOffset": 977656475
},
{
"duration": 7058,
"fieldName": "name",
"parentType": "Company",
"path": [
"companyLocationCreate",
"companyLocation",
"company",
"name"
],
"returnType": "String",
"startOffset": 977678463
},
{
"parentType": "Company",
"path": [
"companyLocationCreate",
"companyLocation",
"company",
"mainContact"
],
"returnType": "CompanyContact",
"startOffset": 977764098,
"duration": 8367,
"fieldName": "mainContact"
},
{
"fieldName": "userErrors",
"parentType": "CompanyLocationCreatePayload",
"path": [
"companyLocationCreate",
"userErrors"
],
"returnType": "[BusinessCustomerUserError!]!",
"startOffset": 977841875,
"duration": 8830
}
]
},
"parsing": {
"duration": 1640462,
"startOffset": 1712836
},
"startTime": "2024-05-14T10:26:15.649Z",
"validation": {
"duration": 1836182,
"startOffset": 4108451
},
"version": 1
}
}
}
Was this article helpful to you?