Lune Bundle selections API
Bundle selections define how an order is being split across a set of project bundles.
Bundle selections define how an order is being split across a set of project bundles.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/lune:lune-bundle-selections-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Lune Bundle selections API
version: '1.0'
contact:
name: Lune Support
email: support@lune.co
termsOfService: https://lune.co/terms
description: 'Operations tagged Bundle selections across 2 of this provider''s published API definitions: openapi.yml, lune-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.lune.co/v1
description: Lune's REST API
tags:
- name: Bundle selections
description: Bundle selections define how an order is being split across a set of project bundles.
x-lune-component: BundleSelection
paths:
/bundle-selections:
get:
summary: Get an account's bundle selection
operationId: getBundleSelection
security:
- BearerAuth: []
tags:
- Bundle selections
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/BundleSelection'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
put:
summary: Update an account's bundle selection
operationId: updateBundleSelection
security:
- BearerAuth: []
tags:
- Bundle selections
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BundleSelectionRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/BundleSelection'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'413':
$ref: '#/components/responses/PayloadTooLarge'
'415':
$ref: '#/components/responses/UnsupportedMediaType'
'429':
$ref: '#/components/responses/TooManyRequests'
servers:
- url: https://api.lune.co/v1
description: Lune's REST API
components:
schemas:
Error:
type: object
description: Individual error information
required:
- error_code
- message
properties:
error_code:
type: string
description: Immutable string representing a specific error.
example: account_suspended
enum:
- api_version_invalid
- account_suspended
- bundle_selection_ratios_invalid
- bundle_selection_bundle_invalid
- order_idempotency_already_exists
- order_quantity_invalid
- order_value_invalid
- bundle_id_invalid
- id_invalid
- distance_invalid
- test_account_name_update_disallowed
- validation_error
- bundle_selection_ratios_invalid_format
- address_not_found
- port_not_found
- locode_not_found
- airport_invalid
- webhook_limit_reached
- time_range_invalid
- exchange_rate_not_found
- live_account_required
- unauthorised
- estimate_not_found
- estimate_order_already_placed
- sustainability_page_slug_not_unique
- sustainability_page_exists
- pagination_limit_invalid
- unsupported_image_format
- source_location_code_invalid
- destination_location_code_invalid
- emission_factor_id_invalid
- emission_factor_unit_mismatch
- emission_factor_gated
- account_scope_incorrect
- service_unavailable
- handle_not_unique
- estimate_idempotency_already_exists
- airport_route_required
- future_departure_invalid
- transaction_document_inference_failure
- transaction_document_creation_failure
- invalid_selected_account_id
- account_idempotency_already_exists
- account_handle_idempotency_key_inconsistency
- shipment_batch_idempotency_already_exists
- route_not_found
- insufficient_credits
- client_account_mismatch
message:
type: string
description: 'Human readable error message.
This value can contain some extra information about the error in
human-readable form. Not suitable for programmatic consumption, the format
is not guaranteed to be stable.
'
BundlePercentage:
type: object
description: Maps a bundle's unique identifier to an allocation ratio
required:
- bundle_id
- percentage
properties:
bundle_id:
type: string
example: BmWxrvXo29eGqzA1qjANL5PwnkgaO8R3
description: The bundle's unique identifier
percentage:
oneOf:
- type: integer
example: 43
description: Selection percentage
x-lune-name: Selection percentage as integer
- type: string
example: '43.21'
pattern: ^[0-9]+(\.\d{1,2})?$
description: Selection percentage in decimals
x-lune-name: Selection percentage in decimals
BundlePercentageRequest:
type: object
description: Maps a bundle id to an allocation ratio
required:
- bundle_id
properties:
bundle_id:
type: string
example: BmWxrvXo29eGqzA1qjANL5PwnkgaO8R3
description: The bundle's unique identifier
percentage:
oneOf:
- type: integer
x-lune-name: Selection percentage as integer
example: 43
description: Selection percentage
- type: string
example: '43.21'
pattern: ^[0-9]+(\.\d{1,2})?$
x-lune-name: Selection percentage in decimals
description: Selection percentage in decimals
ErrorResponse:
x-lune-name: Error response
description: 'An error response containing the error details.
The `error` property provides information about the type of error that occurred.
Use this property for error handling.
The `errors` array is present for backwards compatibility purposes. It always
contains a single error element which is the same seen in the `error` property.
'
type: object
required:
- errors
- error
properties:
errors:
type: array
description: An array containing errors
items:
$ref: '#/components/schemas/Error'
error:
$ref: '#/components/schemas/Error'
BundleSelection:
type: array
description: 'A Bundle Selection represents an account''s default project bundle ratios that are used when an order is placed without specifying project bundles.
An account initial project bundle selection is
* Conserving forests in Asia - 95%
* Ocean Carbon Removal - 5%
'
items:
$ref: '#/components/schemas/BundlePercentage'
example:
- bundle_id: BmWxrvXo29eGqzA1qjANL5PwnkgaO8R3
percentage: 34
- bundle_id: VndoQ0PZjGMzvYOZGwqy6kbgN1eOJx9B
percentage: 66
BundleSelectionRequest:
type: array
description: 'Bundle selection percentages.
The sum of all percentages must equal 100.
If not specified, the preconfigured allocation ratios are going to be used.
If, for each selection, `percentage` is not provided, the selection is divided equally (best effort) between bundles. `percentage` must be provided for all or none of the bundles.
'
items:
$ref: '#/components/schemas/BundlePercentageRequest'
example:
- bundle_id: BmWxrvXo29eGqzA1qjANL5PwnkgaO8R3
percentage: 34
- bundle_id: VndoQ0PZjGMzvYOZGwqy6kbgN1eOJx9B
percentage: 66
responses:
BadRequest:
description: The request is invalid. Parameters may be missing or are invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
TooManyRequests:
description: Too many requests have been made in a short period of time
Unauthorized:
description: The API Key is missing or is invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Forbidden:
description: The API Key is not authorized to perform the operation
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
UnsupportedMediaType:
description: The payload format is in an unsupported format.
PayloadTooLarge:
description: The request is larger than 100kB.
Conflict:
description: The request could not be completed due to a conflict with the current state of the target resource or resources
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: Authorization Bearer API Key (see <a href="#section/Authentication">Authentication</a>)
AccessToken:
type: apiKey
in: query
name: access_token
description: 'An API key used to access a resource that accepts it in the URL.
Note: Lune API keys are not URL-safe, which means that they can''t be included in URLs directly.
They need to be percent-encoded using a function like JavaScript''s [`encodeURIComponent()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) or
Python''s [`urllib.parse.quote()`](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote).
'
x-refined-from:
- openapi.yml
- lune-openapi.yml