companyLocationCreate
mutation
接口访 问需要令牌,具体如何获取令牌请参考:身份认证
公司地点创建。
Example
公司地点创建
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": {
"billingAddress": {
"countryCode": "CA",
"createdAt": "2024-05-14T10:26:15.695Z",
"zip": "53118",
"address2": "long three department",
"id": "gid://shopline/CompanyAddress/6465171768080867624",
"province": null,
"address1": "fake street",
"city": "Ottawa",
"country": null
},
"company": {
"id": "gid://shopline/Company/6261711218190850599",
"mainContact": null,
"name": "Big bom"
},
"id": "gid://shopline/CompanyLocation/6465171766436700454",
"name": "Top catagory location",
"shippingAddress": {
"address2": "golden 3 department",
"city": "Ottawa",
"countryCode": "CA",
"id": "gid://shopline/CompanyAddress/6465171767376224551",
"province": null,
"zip": "53118",
"address1": "funny street",
"country": null,
"createdAt": "2024-05-14T10:26:15.653Z"
}
},
"userErrors": []
}
},
"extensions": {
"dataloader": {
"individual-statistics": {
"LD-com.shopline.pixiu.psm.graphql.api.service.ProductQueryGqlService-optionsForLoader": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ShopQueryGqlService-maxProductVariants": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0
},
"LD-com.shopline.ec.merchant.ugc.i18n.api.interfaces.UgcI18nGraphqlApi-getUgcLocaleResources": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-checkHasProductForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-checkInCollectionForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.DescriptionQueryGqlService-get": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.InventoryQueryGqlService-listItemForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.ShopQueryGqlService-maxProductOptions": {
"batchInvokeCount": 0,
"cacheHitRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.joyy.shopline.soul.appstore.api.service.publication.PublicationQueryGQLService-publicationsForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadErrorCount": 0
},
"LD-com.shopline.benefitrights.giftcard.graphql.api.service.ShopQueryGqlService-canCreateGiftCards": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.CollectionQueryGqlService-seoLoader": {
"batchInvokeCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.psm.graphql.api.service.InventoryQueryGqlService-listLevelByVariantForLoader": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
}
},
"overall-statistics": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfRootCoordinate": "/companyLocationCreate",
"dfRt": 965,
"dfServiceIdentity": "com.shopline.ec.openapi.interfaces.CompanyOpenApi@companyLocationCreate",
"dfErrorCode": null,
"dfProtocol": "dubbo"
}
],
"graphQLMetrics": {
"customizedClientIp": "157.119.232.37",
"fieldCount": 160,
"namespace": "admin",
"operation": "MUTATION",
"saleChannel": null,
"storePlus": false,
"tenant": "ec20",
"countryCode": null,
"errorFieldsCount": 0,
"executionId": "ad2ef1a7-c723-4e43-8ffb-86aed55475b6",
"includeDeprecatedField": false,
"includeQuery": false,
"storeId": "1671771213310",
"endParseTimeMillis": 1715682375651,
"merchantId": "4200333804",
"ratelimitRemaining": 0,
"rt": 978,
"version": "v20240601",
"clientIp": "157.119.232.37",
"deepLevel": 6,
"parseRt": 2,
"ratelimitPermits": 0,
"startTimeMillis": 1715682375649,
"traceId": "50647c6ab8a9c944b337c71fc17ea888",
"loaderCount": 0,
"appId": "264149",
"languageCode": null,
"appKey": "ac46139a45013c6d13b3bdb53ba7b12b2af6d35f",
"startParseTimeMillis": 1715682375649,
"successType": "SUCCESS"
}
},
"tracing": {
"validation": {
"duration": 1836182,
"startOffset": 4108451
},
"version": 1,
"duration": 978017082,
"endTime": "2024-05-14T10:26:16.627Z",
"execution": {
"resolvers": [
{
"duration": 966748323,
"fieldName": "companyLocationCreate",
"parentType": "Mutation",
"path": [
"companyLocationCreate"
],
"returnType": "CompanyLocationCreatePayload",
"startOffset": 8634239
},
{
"duration": 35609,
"fieldName": "companyLocation",
"parentType": "CompanyLocationCreatePayload",
"path": [
"companyLocationCreate",
"companyLocation"
],
"returnType": "CompanyLocation",
"startOffset": 976052616
},
{
"duration": 15360,
"fieldName": "id",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"id"
],
"returnType": "ID",
"startOffset": 976148280
},
{
"duration": 11411,
"fieldName": "name",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"name"
],
"returnType": "String",
"startOffset": 976211574
},
{
"duration": 16092,
"fieldName": "billingAddress",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress"
],
"returnType": "CompanyAddress",
"startOffset": 976349401
},
{
"duration": 12037,
"fieldName": "address1",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"address1"
],
"returnType": "String",
"startOffset": 976429452
},
{
"fieldName": "address2",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"address2"
],
"returnType": "String",
"startOffset": 976462532,
"duration": 9695
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"countryCode"
],
"returnType": "CountryCode",
"startOffset": 976492051,
"duration": 9466,
"fieldName": "countryCode"
},
{
"fieldName": "country",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"country"
],
"returnType": "String",
"startOffset": 976546470,
"duration": 29281
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"createdAt"
],
"returnType": "Date",
"startOffset": 976596787,
"duration": 11378,
"fieldName": "createdAt"
},
{
"fieldName": "id",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"id"
],
"returnType": "ID",
"startOffset": 976708337,
"duration": 12041
},
{
"fieldName": "zip",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"zip"
],
"returnType": "String",
"startOffset": 976740788,
"duration": 10710
},
{
"startOffset": 976768887,
"duration": 11419,
"fieldName": "city",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"city"
],
"returnType": "String"
},
{
"startOffset": 976797941,
"duration": 11796,
"fieldName": "province",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"billingAddress",
"province"
],
"returnType": "String"
},
{
"fieldName": "shippingAddress",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress"
],
"returnType": "CompanyAddress",
"startOffset": 976967908,
"duration": 17595
},
{
"startOffset": 977028629,
"duration": 12338,
"fieldName": "address1",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"address1"
],
"returnType": "String"
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"address2"
],
"returnType": "String",
"startOffset": 977060821,
"duration": 11131,
"fieldName": "address2"
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"countryCode"
],
"returnType": "CountryCode",
"startOffset": 977091185,
"duration": 11101,
"fieldName": "countryCode"
},
{
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"country"
],
"returnType": "String",
"startOffset": 977140637,
"duration": 9908,
"fieldName": "country"
},
{
"fieldName": "createdAt",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"createdAt"
],
"returnType": "Date",
"startOffset": 977170396,
"duration": 153845
},
{
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"id"
],
"returnType": "ID",
"startOffset": 977386094,
"duration": 9771,
"fieldName": "id",
"parentType": "CompanyAddress"
},
{
"returnType": "String",
"startOffset": 977410809,
"duration": 6714,
"fieldName": "zip",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"zip"
]
},
{
"returnType": "String",
"startOffset": 977429845,
"duration": 6911,
"fieldName": "city",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"city"
]
},
{
"fieldName": "province",
"parentType": "CompanyAddress",
"path": [
"companyLocationCreate",
"companyLocation",
"shippingAddress",
"province"
],
"returnType": "String",
"startOffset": 977448761,
"duration": 7521
},
{
"returnType": "Company",
"startOffset": 977594004,
"duration": 19006,
"fieldName": "company",
"parentType": "CompanyLocation",
"path": [
"companyLocationCreate",
"companyLocation",
"company"
]
},
{
"returnType": "ID",
"startOffset": 977656475,
"duration": 7833,
"fieldName": "id",
"parentType": "Company",
"path": [
"companyLocationCreate",
"companyLocation",
"company",
"id"
]
},
{
"parentType": "Company",
"path": [
"companyLocationCreate",
"companyLocation",
"company",
"name"
],
"returnType": "String",
"startOffset": 977678463,
"duration": 7058,
"fieldName": "name"
},
{
"duration": 8367,
"fieldName": "mainContact",
"parentType": "Company",
"path": [
"companyLocationCreate",
"companyLocation",
"company",
"mainContact"
],
"returnType": "CompanyContact",
"startOffset": 977764098
},
{
"startOffset": 977841875,
"duration": 8830,
"fieldName": "userErrors",
"parentType": "CompanyLocationCreatePayload",
"path": [
"companyLocationCreate",
"userErrors"
],
"returnType": "[BusinessCustomerUserError!]!"
}
]
},
"parsing": {
"duration": 1640462,
"startOffset": 1712836
},
"startTime": "2024-05-14T10:26:15.649Z"
}
}
}
这篇文章对你有帮助吗?