Store

Report one paid customer order

Idempotent on order_ref: a second call with the same reference returns the first result. mode is preview while automatic offsetting is off, or for every order posted with a test key (matched, summed, nothing bought), and charged when the receiver created the order; it is null for any other receiver status, because inventing one would state something the receiver did not. A test key's order is stored as test:<order_ref>, and an order_ref that starts with test: in any letter case, or runs past 186 characters, is refused. Any field other than order_ref, currency, line_items and generic is refused. At least one of line_items and generic is required: generic is {carbon_kg} (kilograms the merchant declares) or {spend_usd} (a budget converted through the platform reverse quote at the merchant's product). Kilograms round up to the whole kilogram once, when the order is built. The order may be in any currency: the kilograms come from each product's footprint times its quantity.

post/v1/orders

Request

  • Base URL: https://carbonguru.io
  • URL: https://carbonguru.io/v1/orders
  • Auth: HTTP bearer

Request body

order_refstring required

The order's id in the merchant's own system. At most 186 characters; it must not start with test:.

currencystring

ISO 4217, as the store recorded it. Never assumed.

Response

The receiver's outcome for this order.

order_refstring required
mode'preview' | 'charged' | 'null' nullable required
statusstring required

The receiver's own status, verbatim.

matchedinteger nullable
skipped_refsstring[] nullable
carbon_kgnumber nullable
tokenstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.