Skip to main content

createOrder

Record a new order with automatic carbon footprint calculation.
mutation {
  createOrder(input: {
    externalId: "shopify_order_12345"
    items: [
      { productId: "prod_abc123", quantity: 2 },
      { productId: "prod_def456", quantity: 1 }
    ]
    shippingMethod: TRUCK
    shippingAddress: { country: "NL", postalCode: "1012AB", city: "Amsterdam" }
  }) {
    id
    externalId
    totalCarbonFootprint
    offsetStatus
    items {
      product { id name }
      quantity
      carbonFootprint
    }
    impactSummary {
      totalCo2Equivalent
      shippingImpact
      productionImpact
    }
    equivalency {
      description
      value
    }
  }
}
Input:
FieldTypeRequiredDescription
externalIdStringNoYour system’s order ID
items[OrderItemInput!]!YesLine items
shippingMethodTransportMethodNoDelivery method
shippingAddressAddressInputNoDelivery address

updateOrderOffset

Update the offset status of an order.
mutation {
  updateOrderOffset(input: {
    orderId: "order_xyz789"
    offsetStatus: FULLY_OFFSET
    offsetProvider: "GoldStandard"
    offsetCertificateUrl: "https://registry.goldstandard.org/cert/123"
  }) {
    id
    offsetStatus
    updatedAt
  }
}

deleteOrder

Remove an order record.
mutation {
  deleteOrder(id: "order_xyz789") {
    success
  }
}