I want to call the Zonos GraphQL API to get a landed cost calculation. I am doing this with a function in google sheets.

Here are my creds: credential\_live\_32a3f083-216d-4041-9a66-2658a2a43c35

Here is the intro on Zonos
Zonos graphql API introduction
Welcome to the Zonos graphql API reference documentation.

Authentication
To access the Zonos graphql API, you will need an API token. The API token will be included in all API requests to the server with the header credentialToken that looks like the following:

Headers

credentialToken: credential\_example\_8978ca2a-e567-466a-91c2-f3276cc9aadc
Queries
GraphQL queries are executed by sending HTTP requests to the endpoint:

👍
POST

https://api.zonos.com/graphql

Queries begin with one of the objects listed under QueryRoot. The QueryRoot is the schema’s entry-point for queries.

Queries are equivalent to making a GET request in REST. The example shown is a query to get the id and description of the first three items.

cURL

curl -X POST \
 
https://api.zonos.com/graphql \
 
-H 'Content-Type: application/json' \
 
-H 'credentialToken: {access\_token}' \
 
-d '
 Query 
query {
 items(first: 3) {
 edges {
 node {
 id
 description
 }
 }
 }
}
 '
Calculate a landed cost - GraphQL
Learn how to calculate an accurate landed cost quote for cross-border shipments.

Zonos Landed Cost simplifies an otherwise complex method for calculating duties and taxes on international imports. We deliver a true total landed cost calculation, including the sum of duties, taxes, and additional fees from customs, brokers, or the shipping carrier.

Add details required to calculate a landed cost 
To get an accurate landed cost quote using Zonos, you will need to supply as much as detail as possible.

If you do not pass an hsCode, the default hsCode assigned to your store will be used. To ensure accuaracy, thenf full destination address is required as it will impact the calculation. Lastly, the shipment options returned in the response will correlate with the serviceLevels you have assigned to shipping profiles in Dashboard. If you are expecting a serviceLevel in the response but it does not show up, please ensure that that serviceLevel is enabled.?

Here is the mutation:

mutation {
 partyCreateWorkflow(
 input: [
 {
 location: {
 administrativeArea: "Utah"
 administrativeAreaCode: "UT"
 countryCode: US
 line1: "345 N 2450 E"
 line2: "#151"
 locality: "St George"
 postalCode: "84790"
 }
 type: ORIGIN
 }
 {
 location: {
 administrativeArea: "BC"
 administrativeAreaCode: "BC"
 countryCode: CA
 line1: "27 Sussex Dr."
 locality: "Victoria"
 postalCode: "V8T 2V9"
 }
 person: {
 email: "test@gmail.com"
 firstName: "firstName"
 lastName: "lastName"
 phone: "5022303021"
 companyName: "goProTest"
 metadata: { key: "key", value: "value" }
 }
 type: DESTINATION
 }
 {
 type: PAYOR
 location: {
 administrativeArea: "ON"
 administrativeAreaCode: "ON"
 countryCode: CA
 latitude: 1.2
 line1: "asdf"
 line2: "asdf"
 locality: "locality"
 longitude: 3423.2
 postalCode: "M4C 1A1"
 }
 person: {
 email: "test@gmail.com"
 firstName: "firstName"
 lastName: "lastName"
 phone: "5022303021"
 companyName: "goProTest"
 metadata: { key: "key", value: "value" }
 }
 }
 ]
 ) {
 type
 id
 organization
 }

 itemCreateWorkflow(
 input: [
 {
 amount: 69
 currencyCode: USD
 countryOfOrigin: US
 quantity: 1
 productId: "productId"
 hsCode: "1006.30"
 description: "description"
 measurements: [
 { type: WIDTH, value: 2, unitOfMeasure: CENTIMETER }
 { type: WEIGHT, value: 2, unitOfMeasure: POUND }
 ]
 }
 {
 amount: 62
 currencyCode: CAD
 countryOfOrigin: US
 hsCode: "1006.30"
 quantity: 1
 productId: "productId2"
 description: "description2"
 measurements: [
 { type: WIDTH, value: 2, unitOfMeasure: CENTIMETER }
 { type: WEIGHT, value: 2, unitOfMeasure: POUND }
 ]
 }
 ]
 ) {
 id
 amount
 }
 cartonizeWorkflow {
 id
 type
 items {
 item {
 id
 }
 }
 }
 shipmentRatingCalculateWorkflow {
 id
 amount
 }
 landedCostCalculateWorkflow(
 input: { endUse: FOR\_RESALE, method: DAP, tariffRate: ZONOS\_PREFERRED }
 ) {
 id
 fees {
 amount
 currency
 }
 }
}

Here is an example response:

{
 "data": {
 "partyCreateWorkflow": [
 {
 "type": "ORIGIN",
 "id": "party\_749959ae-b9ff-4de4-b4ac-59cc990c53ba",
 "organization": "organization\_dbb64939-12d7-4f12-98ea-7ae5b21acfd0"
 },
 {
 "type": "DESTINATION",
 "id": "party\_cd7ff245-76b6-464f-a7bf-151ebe1f8833",
 "organization": "organization\_dbb64939-12d7-4f12-98ea-7ae5b21acfd0"
 },
 {
 "type": "PAYOR",
 "id": "party\_00e63a9e-9735-44d9-b129-3b3e76c5df25",
 "organization": "organization\_dbb64939-12d7-4f12-98ea-7ae5b21acfd0"
 }
 ],
 "itemCreateWorkflow": [
 {
 "id": "item\_fb156758-cc0a-4dcf-ad46-f8aa6cc34a0d",
 "amount": 69
 },
 {
 "id": "item\_a179a9fc-f56b-40ed-babd-e50592556300",
 "amount": 62
 }
 ],
 "cartonizeWorkflow": [
 {
 "id": "carton\_f4dd1458-96d8-4136-9537-2cddbf0ccf6e",
 "type": "PACKAGE",
 "items": [
 {
 "item": {
 "id": "item\_fb156758-cc0a-4dcf-ad46-f8aa6cc34a0d"
 }
 },
 {
 "item": {
 "id": "item\_a179a9fc-f56b-40ed-babd-e50592556300"
 }
 }
 ]
 }
 ],
 "shipmentRatingCalculateWorkflow": [
 {
 "id": "shipment\_rating\_b5d0fe0e-1318-4754-a518-2c075050ef04",
 "amount": 173.2
 },
 {
 "id": "shipment\_rating\_0b43c92a-e856-47b4-ad37-0c0754c3d170",
 "amount": 190.1
 }
 ],
 "landedCostCalculateWorkflow": [
 {
 "id": "landed\_cost\_23862617-2213-4706-a08b-85e1b4788420",
 "fees": [
 {
 "amount": 1.44,
 "currency": "USD"
 },
 {
 "amount": 0.13,
 "currency": "USD"
 }
 ]
 },
 {
 "id": "landed\_cost\_647bb4cb-73b4-46cc-ba3b-8c6450fe7243",
 "fees": [
 {
 "amount": 1.44,
 "currency": "USD"
 },
 {
 "amount": 0.13,
 "currency": "USD"
 }
 ]
 }
 ]
 }
}

I currenlty have the fields in columns in google sheets, (city is in column B)
city country postal\_code state id unitPrice countryOfOrigin itemHSCode description quantity weight shipping\_amount shipping\_service\_level

---

Can you please create a function in google sheets to get the landed cost? I 

I want my formual to get the details to look like this. =landedCostGraphQL(B3,C3,D3,E3,F3,G3,H3,I3,J3,K3,L3,M3,N3)
착륙 비용 계산을 얻기 위해 Zonos GraphQL API를 호출하고 싶습니다. 구글 시트의 함수를 사용하여이 작업을 수행하고 있습니다.내 크레딧은 다음과 같습니다 : credential\_live\_32a3f083-216d-4041-9a66-2658a2a43c35다음은 Zonos에 대한 소개입니다.Zonos 그래프 쿼리 API 소개Zonos graphql API 참조 문서에 오신 것을 환영합니다.인증Zonos graphql API에 액세스하려면 API 토큰이 필요합니다. API 토큰은 서버에 대한 모든 API 요청에 다음과 같은 헤더 credentialToken으로 포함됩니다:헤더credentialToken: credential\_example\_8978ca2a-e567-466a-91c2-f3276cc9aadc쿼리GraphQL 쿼리는 HTTP 요청을 엔드포인트로 전송하여 실행됩니다:👍POSThttps://api.zonos.com/graphql쿼리는 QueryRoot 아래에 나열된 객체 중 하나에서 시작됩니다. 쿼리 루트는 쿼리를 위한 스키마의 진입점입니다.쿼리는 REST에서 GET 요청을 하는 것과 동일합니다. 표시된 예는 처음 세 항목의 ID와 설명을 가져오는 쿼리입니다.cURLcurl -X POST \ https://api.zonos.com/graphql \ -H 'Content-Type: application/json' \ -H 'credentialToken: {access\_token}' \ -d ' 쿼리 query { items(first: 3) { 에지 { 노드 { id 설명 } } }} '도착 비용 계산 - GraphQL해외 배송에 대한 정확한 도착지 비용 견적을 계산하는 방법을 알아보세요.Zonos 착륙 비용은 해외 수입품에 대한 관세 및 세금을 계산하는 복잡한 방법을 단순화합니다. 세관, 중개인 또는 배송업체의 관세, 세금 및 추가 수수료의 합계를 포함하여 진정한 총 착륙 비용 계산을 제공합니다.착륙 비용 계산에 필요한 세부 정보 추가하기 Zonos를 사용하여 정확한 착륙 비용 견적을 받으려면 가능한 한 많은 세부 정보를 제공해야 합니다.hsCode를 전달하지 않으면 스토어에 할당된 기본 hsCode가 사용됩니다. 정확성을 보장하기 위해 전체 목적지 주소는 계산에 영향을 미치므로 필요합니다. 마지막으로 응답에 반환되는 배송 옵션은 대시보드에서 배송 프로필에 할당된 서비스 수준과 상호 연관됩니다. 응답에 서비스 수준이 예상되지만 표시되지 않는 경우 해당 서비스 수준이 사용 설정되어 있는지 확인하세요.다음은 변이입니다:mutation { partyCreateWorkflow( input: [ { 위치 { 행정 구역: "유타" 행정구역코드: "UT" countryCode: US line1: "345 N 2450 E" line2: "#151" locality: "St George" postalCode: "84790" } type: ORIGIN } { 위치 { 행정구역: "BC" 행정 구역 코드: "BC" countryCode: CA line1: "27 Sussex Dr." locality: "Victoria" postalCode: "V8T 2V9" } 사람: { 이메일 "test@gmail.com" firstName: "firstName" lastName: "성" phone: "5022303021" companyName: "goProTest" 메타데이터: { 키: "키", 값: "값" } } 유형: DESTINATION } { type: PAYOR location: { 행정구역: "ON" 행정구역코드: "ON" countryCode: CA latitude: 1.2 line1: "asdf" line2: "asdf" locality: "locality" longitude: 3423.2 postalCode: "M4C 1A1" } 사람: { 이메일 "test@gmail.com" firstName: "firstName" lastName: "성" phone: "5022303021" companyName: "goProTest" 메타데이터: { 키: "키", 값: "값" } } } ] ) { type id 조직 } itemCreateWorkflow( 입력 [ { 금액: 69 currencyCode: USD 원산지 국가: US 수량 1 productId: "productId" hsCode: "1006.30" 설명 "설명" 측정값: [ { type: WIDTH, value: 2, unitOfMeasure: 센티미터 } { type: WEIGHT, value: 2, unitOfMeasure: POUND } ] } { 금액: 62 통화코드: CAD 원산지 국가: US hsCode: "1006.30" 수량 1 productId: "productId2" 설명: "description2" 측정값: [ { type: WIDTH, value: 2, unitOfMeasure: 센티미터 } { type: WEIGHT, value: 2, unitOfMeasure: POUND } ] } ] ) { id 금액 } 카톤화 워크플로 { id 유형 품목 { item { id } } } 배송 등급 계산 워크플로 { id 금액 } landedCostCalculateWorkflow( input: { endUse: FOR\_RESALE, method: DAP, tariffRate: 조노스\_선호 } ) { id 수수료 { 금액 통화 } }}다음은 응답 예시입니다:{ "data": { "partyCreateWorkflow": [ { "type": "ORIGIN", "id": "party\_749959ae-b9ff-4de4-b4ac-59cc990c53ba", "조직": "organization\_dbb64939-12d7-4f12-98ea-7ae5b21acfd0" }, { "type": "목적지", "id": "party\_cd7ff245-76b6-464f-a7bf-151ebe1f8833", "조직": "organization\_dbb64939-12d7-4f12-98ea-7ae5b21acfd0" }, { "type": "PAYOR", "id": "party\_00e63a9e-9735-44d9-b129-3b3e76c5df25", "조직": "organization\_dbb64939-12d7-4f12-98ea-7ae5b21acfd0" } ], "itemCreateWorkflow": [ { "id": "item\_fb156758-cc0a-4dcf-ad46-f8aa6cc34a0d", "금액": 69 }, { "id": "item\_a179a9fc-f56b-40ed-babd-e50592556300", "금액": 62 } ], "카톤화 워크플로": [ { "id": "carton\_f4dd1458-96d8-4136-9537-2cddbf0ccf6e", "type": "PACKAGE", "items": [ { "item": { "id": "item\_fb156758-cc0a-4dcf-ad46-f8aa6cc34a0d" } }, { "item":