DOCS

Create a landed cost graphql

/

Erstellen Sie einen landed cost

Erfahren Sie, wie Sie einen landed cost aus einer Versandbewertung erstellen.

GraphQL

In Szenarien, in denen Sie Zonos zur Berechnung von Versandbewertungen verwenden, aber eine andere Methode zur Berechnung von Steuern haben, um Ihr Geschäft zu unterstützen, können Sie die createLandedCost-Mutation verwenden. Diese Mutation ermöglicht es Ihnen, einen landed cost zu erstellen, der für die Auftragserteilung erforderlich ist, ohne dass Zonos Zölle, Steuern und Gebühren berechnet.

API-Beispiele 

Bei Verwendung von landedCostCreate müssen Sie den currencyCode und endUse übergeben. Sie müssen auch den rootId und shipmentRatingId übergeben, die aus dem ursprünglichen Versandbewertungsworkflow erhalten wurden. Optional können Sie eine oder mehrere Listen von Zöllen, Gebühren und Steuern bereitstellen. Beim Bereitstellen dieser Details müssen Sie den Betrag und die Formel senden, die zur Bestimmung des Werts verwendet wurden, der im Feld Betrag verwendet wird.

Mutation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
mutation {
  landedCostCreate(
    input: {
      currencyCode: USD
      endUse: NOT_FOR_RESALE
      shipmentRating: "shipment_rating_822af8c6-9d3f-49e5-bc7a-1a96691c322b"
      tariffRate: ZONOS_PREFERRED
      taxes: [
        {
          amount: "3.375"
          formula: "6.75% of the item cost"
          item: "item_268b5769-4ffd-47d5-a1c7-0177a9a281d1"
          description: "Sales Tax"
        }
        {
          amount: "4.6575"
          formula: "6.75% of the item cost"
          item: "item_1735c05f-cc4a-48bc-8a4f-de8346572288"
          description: "Sales Tax"
        }
        {
          amount: "2.47725"
          formula: "6.75% of the shipping cost"
          description: "Sales Tax"
        }
      ]
      rootId: "zonos_internal_federated_request_2610cbc2-991e-4acc-b78c-106ed1b06792"
    }
  ) {
    id
    landedCostGuaranteeCode
    taxes {
      amount
      formula
      item {
        id
        sku
        amount
      }
    }
    amountSubtotals {
      items
      taxes
      shipping
    }
    shipmentRating {
      shipmentRatingCartons {
        carton {
          items {
            item {
              sku
              amount
              id
            }
          }
        }
      }
    }
  }
}

Antwort

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
  "data": {
    "landedCostCreate": {
      "id": "landed_cost_c2ccd403-81e0-4ea9-8958-bc5cc5f10b81",
      "landedCostGuaranteeCode": "NOT_APPLICABLE",
      "taxes": [
        {
          "amount": 3.375,
          "formula": "6.75% of the item cost",
          "item": {
            "id": "item_268b5769-4ffd-47d5-a1c7-0177a9a281d1",
            "sku": "1",
            "amount": 50.0
          }
        },
        {
          "amount": 4.6575,
          "formula": "6.75% of the item cost",
          "item": {
            "id": "item_1735c05f-cc4a-48bc-8a4f-de8346572288",
            "sku": "2",
            "amount": 69.0
          }
        },
        {
          "amount": 2.47725,
          "formula": "6.75% of the shipping cost",
          "item": null
        }
      ],
      "amountSubtotals": {
        "items": 119.0,
        "taxes": 10.51,
        "shipping": 36.7
      },
      "shipmentRating": {
        "shipmentRatingCartons": [
          {
            "carton": {
              "items": [
                {
                  "item": {
                    "sku": "1",
                    "amount": 50.0,
                    "id": "item_268b5769-4ffd-47d5-a1c7-0177a9a281d1"
                  }
                },
                {
                  "item": {
                    "sku": "2",
                    "amount": 69.0,
                    "id": "item_1735c05f-cc4a-48bc-8a4f-de8346572288"
                  }
                }
              ]
            }
          }
        ]
      }
    }
  }
}

War diese Seite hilfreich?