Documentation Index
Fetch the complete documentation index at: https://docs.heychocolate.com/llms.txt
Use this file to discover all available pages before exploring further.
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:
| Field | Type | Required | Description |
|---|
externalId | String | No | Your system’s order ID |
items | [OrderItemInput!]! | Yes | Line items |
shippingMethod | TransportMethod | No | Delivery method |
shippingAddress | AddressInput | No | Delivery 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
}
}