DOCS

Order 생성

Landed cost quote에서 order를 생성하는 방법을 알아봅니다.

GraphQL

landedCost를 생성하거나 계산한 후에는 받은 landedCost quote를 order에 연결하는 orderCreate mutation을 사용해야 하며, 이를 통해 Landed Cost guarantee가 활성화됩니다. order가 생성되면 Zonos fee가 청구됩니다.

Mutation input 준비 

orderCreate mutation에는 특정 input data가 필요합니다. 추가 optional field를 사용할 수 있지만, 다음 field는 필수입니다:

  • currencyCode: order가 이루어진 currency.
  • landedCostId: order에 사용된 landed cost quote의 ID.
  • accountOrderNumber: 할당하는 order number(대개 platform order number). organization 내에서 각 order number는 고유해야 합니다.

landedCostId는 단일 order에만 사용할 수 있습니다. 여러 order를 생성하려면 각각 새 landed cost quote를 생성해야 합니다. landedCostId를 재사용하면 error가 발생합니다.

Mutation 전송 

필수 input data를 준비한 후 선택한 client library 또는 tool로 API endpoint에 GraphQL mutation을 전송합니다. mutation 구조 예시는 다음과 같습니다:

landed cost quote를 기반으로 order를 생성할 때 이 mutation을 사용합니다.

1mutation CreateOrder($input: OrderCreateInput!) {
2 orderCreate(input: $input) {
3 id
4 organization
5 landedCosts {
6 id
7 }
8 }
9}
GraphQL API ReferenceTypes, inputs, and operations used in this guide

이 페이지가 도움이 되었나요?