Lune Docs Logo
Log inContact us

Accounts

Create an account pair

HTTP POST to /v1/accountsCreate a pair of live and test accounts. The accounts are linked via the sibling_id property.
Request body

The account name.

The account's currency.

ISO 4217 3 character currency code.

Note: Lune does not support all currency codes.

GBP
EUR
USD
SEK
CHF

The account beneficiary. Leading and trailing spaces are removed.

Pattern: ^[a-z0-9-_]+$

handle is a client defined URL-friendly string that identifies the account.

The handle is unique per organisation and account type.

Enum to control the visibility of external pages such as sustainability and analytics pages.

public
hidden
  • Sample request
  • Response

    An Account represents the entity which performs API operations.

    Each API operation like creating an order or creating an emission estimate is ring-fenced within an Account.

    The Account's unique identifier

    The Account's name

    The unique identifier of the organisation this account belongs to

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    The account's currency.

    ISO 4217 3 character currency code.

    Note: Lune does not support all currency codes.

    GBP
    EUR
    USD
    SEK
    CHF

    The account's type.

    live
    test

    The account logo

    Retirement beneficiary

    This is the name that appears on future retirements that are made in this account. If none is present, the organisation beneficiary will be used instead.

    Bundle portfolio id tied to the account.

    Enum to control the visibility of external pages such as sustainability and analytics pages.

    public
    hidden

    An Account represents the entity which performs API operations.

    Each API operation like creating an order or creating an emission estimate is ring-fenced within an Account.

    The Account's unique identifier

    The Account's name

    The unique identifier of the organisation this account belongs to

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    The account's currency.

    ISO 4217 3 character currency code.

    Note: Lune does not support all currency codes.

    GBP
    EUR
    USD
    SEK
    CHF

    The account's type.

    live
    test

    The account logo

    Retirement beneficiary

    This is the name that appears on future retirements that are made in this account. If none is present, the organisation beneficiary will be used instead.

    Bundle portfolio id tied to the account.

    Enum to control the visibility of external pages such as sustainability and analytics pages.

    public
    hidden
  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    400
    api_version_invalid
    400
    bundle_selection_ratios_invalid
    400
    bundle_selection_bundle_invalid
    400
    order_value_invalid
    400
    bundle_id_invalid
    400
    id_invalid
    400
    distance_invalid
    400
    test_account_name_update_disallowed
    400
    bundle_selection_ratios_invalid_format
    400
    address_not_found

    List accounts

    HTTP GET to /v1/accounts
    Query parameters

    Pattern: ^\d+$

    Maximum number of resources to return, between 1 and 100.

    A cursor for use in pagination.

    The cursor that points to the starting item of the next page of results. If not provided, the first page of results is returned.

    Pattern: ^[a-zA-Z0-9_]{3,}$

    Filter accounts based on name (case insensitive). The value can appear at the beggining, middle or end on the actual account name.

  • Sample request
  • Response

    Whether or not there are more elements available after this set.

    If false, this set comprises the end of the array.

    Part of a paginated response.

    The cursor value to be used as the after parameter for fetching the next page of results.

    null if has_more is false.

    An array of Account objects

    Part of a paginated response.

    An Account represents the entity which performs API operations.

    Each API operation like creating an order or creating an emission estimate is ring-fenced within an Account.

    The Account's unique identifier

    The Account's name

    The unique identifier of the organisation this account belongs to

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    The account's currency.

    ISO 4217 3 character currency code.

    Note: Lune does not support all currency codes.

    GBP
    EUR
    USD
    SEK
    CHF

    The account's type.

    live
    test

    The account logo

    Retirement beneficiary

    This is the name that appears on future retirements that are made in this account. If none is present, the organisation beneficiary will be used instead.

    Bundle portfolio id tied to the account.

    Enum to control the visibility of external pages such as sustainability and analytics pages.

    public
    hidden
  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    400
    api_version_invalid
    400
    bundle_selection_ratios_invalid
    400
    bundle_selection_bundle_invalid
    400
    order_value_invalid
    400
    bundle_id_invalid
    400
    id_invalid
    400
    distance_invalid
    400
    test_account_name_update_disallowed
    400
    bundle_selection_ratios_invalid_format
    400
    address_not_found

    Get an account

    HTTP GET to /v1/accounts/me
  • Sample request
  • Response

    An Account represents the entity which performs API operations.

    Each API operation like creating an order or creating an emission estimate is ring-fenced within an Account.

    The Account's unique identifier

    The Account's name

    The unique identifier of the organisation this account belongs to

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    The account's currency.

    ISO 4217 3 character currency code.

    Note: Lune does not support all currency codes.

    GBP
    EUR
    USD
    SEK
    CHF

    The account's type.

    live
    test

    The account logo

    Retirement beneficiary

    This is the name that appears on future retirements that are made in this account. If none is present, the organisation beneficiary will be used instead.

    Bundle portfolio id tied to the account.

    Enum to control the visibility of external pages such as sustainability and analytics pages.

    public
    hidden
  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    400
    api_version_invalid
    400
    bundle_selection_ratios_invalid
    400
    bundle_selection_bundle_invalid
    400
    order_value_invalid
    400
    bundle_id_invalid
    400
    id_invalid
    400
    distance_invalid
    400
    test_account_name_update_disallowed
    400
    bundle_selection_ratios_invalid_format
    400
    address_not_found

    Update an account

    HTTP PUT to /v1/accounts/{id}Update an account. Live accounts will replicate a name change to its sibling account. Test accounts name updates are disallowed (name property must match the current account name).
    Query parameters

    The account's unique identifier

    Request body

    It's only possible to edit the name and beneficiary of an account.

    Not providing the beneficiary property will result in clearing the existing value (if present).

    The account name.

    The account beneficiary. Leading and trailing spaces are removed.

    The bundle portfolio unique identifier.

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    Either hidden or public. Controls the visibility of external pages such as sustainability and analytics pages. Default is hidden

    public
    hidden
  • Sample request
  • Response

    An Account represents the entity which performs API operations.

    Each API operation like creating an order or creating an emission estimate is ring-fenced within an Account.

    The Account's unique identifier

    The Account's name

    The unique identifier of the organisation this account belongs to

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    The account's currency.

    ISO 4217 3 character currency code.

    Note: Lune does not support all currency codes.

    GBP
    EUR
    USD
    SEK
    CHF

    The account's type.

    live
    test

    The account logo

    Retirement beneficiary

    This is the name that appears on future retirements that are made in this account. If none is present, the organisation beneficiary will be used instead.

    Bundle portfolio id tied to the account.

    Enum to control the visibility of external pages such as sustainability and analytics pages.

    public
    hidden
  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    400
    api_version_invalid
    400
    bundle_selection_ratios_invalid
    400
    bundle_selection_bundle_invalid
    400
    order_value_invalid
    400
    bundle_id_invalid
    400
    id_invalid
    400
    distance_invalid
    400
    test_account_name_update_disallowed
    400
    bundle_selection_ratios_invalid_format
    400
    address_not_found

    Partially update an account

    HTTP PATCH to /v1/accounts/{id}Partially update an account. Live accounts will replicate a name change to its sibling account. Test accounts name updates are disallowed (name property must match the current account name).
    Query parameters

    The account's unique identifier

    Request body

    Providing null on a property will result in clearing the existing value (if present).

    The account name.

    The account beneficiary. Leading and trailing spaces are removed.

    The bundle portfolio unique identifier.

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    Controls the visibility of external pages such as sustainability and analytics pages.

    Defaults to hidden.

    public
    hidden

    A unique identifier provided by the client.

    idempotency_key is unique per account type.

    The property ensures Accounts created with an existing idempotency_key are not created.

  • Sample request
  • Response

    An Account represents the entity which performs API operations.

    Each API operation like creating an order or creating an emission estimate is ring-fenced within an Account.

    The Account's unique identifier

    The Account's name

    The unique identifier of the organisation this account belongs to

    Pattern: ^[a-z0-9-_]+$

    handle is a client defined URL-friendly string that identifies the account.

    The handle is unique per organisation and account type.

    The account's currency.

    ISO 4217 3 character currency code.

    Note: Lune does not support all currency codes.

    GBP
    EUR
    USD
    SEK
    CHF

    The account's type.

    live
    test

    The account logo

    Retirement beneficiary

    This is the name that appears on future retirements that are made in this account. If none is present, the organisation beneficiary will be used instead.

    Bundle portfolio id tied to the account.

    Enum to control the visibility of external pages such as sustainability and analytics pages.

    public
    hidden
  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    400
    api_version_invalid
    400
    bundle_selection_ratios_invalid
    400
    bundle_selection_bundle_invalid
    400
    order_value_invalid
    400
    bundle_id_invalid
    400
    id_invalid
    400
    distance_invalid
    400
    test_account_name_update_disallowed
    400
    bundle_selection_ratios_invalid_format
    400
    address_not_found
    HTTP POST to /v1/accounts/{id}/logo
    Query parameters

    The account's unique identifier

    Request body
  • Content type is multipart/form-data
  • Sample request
  • Response

    Uploaded account logo URL

  • Sample response
  • Errors
    This API operation can return the following errors:
    HTTP status codeError code
    400
    api_version_invalid
    400
    bundle_selection_ratios_invalid
    400
    bundle_selection_bundle_invalid
    400
    order_value_invalid
    400
    bundle_id_invalid
    400
    id_invalid
    400
    distance_invalid
    400
    test_account_name_update_disallowed
    400
    bundle_selection_ratios_invalid_format
    400
    address_not_found