The Currency object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

currency_name string required
enabled boolean

Default: false

symbol string
fraction string
fraction_units integer
smallest_currency_fraction_value number
number_format string
symbol_on_right boolean

Default: false

The Currency object
{
  "id": "currency_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "currency_name": "USD",
  "enabled": false,
  "symbol": "symbol_example",
  "fraction": "fraction_example",
  "fraction_units": 0,
  "smallest_currency_fraction_value": 0,
  "number_format": "number_format_example",
  "symbol_on_right": false
}
GET /api/core/currency/{id}

Retrieve a currency

Retrieves the details of an existing currency. Supply the unique currency ID that was returned from a previous request.

Path parameters

id string required

The identifier of the currency to retrieve.

Returns

Returns the currency object if a valid identifier was provided.

GET /api/core/currency/{id}
curl https://api.overplane.dev/api/core/currency/currency_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "currency_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "currency_name": "USD",
  "enabled": false,
  "symbol": "symbol_example",
  "fraction": "fraction_example",
  "fraction_units": 0,
  "smallest_currency_fraction_value": 0,
  "number_format": "number_format_example",
  "symbol_on_right": false
}
GET /api/core/currency

List all currencys

Returns a list of currencys. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of currency objects.

GET /api/core/currency
curl https://api.overplane.dev/api/core/currency \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "currency_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "currency_name": "USD",
      "enabled": false,
      "symbol": "symbol_example",
      "fraction": "fraction_example",
      "fraction_units": 0,
      "smallest_currency_fraction_value": 0,
      "number_format": "number_format_example",
      "symbol_on_right": false
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/core/currency

Create a currency

Creates a new currency object.

Body parameters

currency_name string required
enabled boolean

Default: false

symbol string
fraction string
fraction_units integer
smallest_currency_fraction_value number
number_format string
symbol_on_right boolean

Default: false

Returns

Returns the newly created currency object if the call succeeded.

POST /api/core/currency
curl https://api.overplane.dev/api/core/currency \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"currency_name":"USD"}'
Response
{
  "id": "currency_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "currency_name": "USD",
  "enabled": false,
  "symbol": "symbol_example",
  "fraction": "fraction_example",
  "fraction_units": 0,
  "smallest_currency_fraction_value": 0,
  "number_format": "number_format_example",
  "symbol_on_right": false
}
PATCH /api/core/currency/{id}

Update a currency

Updates the specified currency by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the currency to update.

Body parameters

currency_name string
enabled boolean

Default: false

symbol string
fraction string
fraction_units integer
smallest_currency_fraction_value number
number_format string
symbol_on_right boolean

Default: false

Returns

Returns the updated currency object.

PATCH /api/core/currency/{id}
curl https://api.overplane.dev/api/core/currency/currency_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"currency_name":"USD","enabled":false}'
Response
{
  "id": "currency_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "currency_name": "USD",
  "enabled": false,
  "symbol": "symbol_example",
  "fraction": "fraction_example",
  "fraction_units": 0,
  "smallest_currency_fraction_value": 0,
  "number_format": "number_format_example",
  "symbol_on_right": false
}
DELETE /api/core/currency/{id}

Delete a currency

Permanently deletes a currency. This cannot be undone.

Path parameters

id string required

The identifier of the currency to delete.

Returns

Returns a confirmation that the currency has been deleted.

DELETE /api/core/currency/{id}
curl https://api.overplane.dev/api/core/currency/currency_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "currency_abc123",
  "deleted": true
}