The Currency Exchange 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.

date string required
from_currency string required
to_currency string required
exchange_rate number required
for_buying boolean

Default: true

for_selling boolean

Default: true

The Currency Exchange object
{
  "id": "currency-exchange_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "date": "2024-01-15",
  "from_currency": "USD",
  "to_currency": "USD",
  "exchange_rate": 0,
  "for_buying": true,
  "for_selling": true
}
GET /api/setup/currency-exchange/{id}

Retrieve a currency exchange

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

Path parameters

id string required

The identifier of the currency exchange to retrieve.

Returns

Returns the currency exchange object if a valid identifier was provided.

GET /api/setup/currency-exchange/{id}
curl https://api.overplane.dev/api/setup/currency-exchange/currency-exchange_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "currency-exchange_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "date": "2024-01-15",
  "from_currency": "USD",
  "to_currency": "USD",
  "exchange_rate": 0,
  "for_buying": true,
  "for_selling": true
}
GET /api/setup/currency-exchange

List all currency exchanges

Returns a list of currency exchanges. 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 exchange objects.

GET /api/setup/currency-exchange
curl https://api.overplane.dev/api/setup/currency-exchange \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "currency-exchange_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "date": "2024-01-15",
      "from_currency": "USD",
      "to_currency": "USD",
      "exchange_rate": 0,
      "for_buying": true,
      "for_selling": true
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/setup/currency-exchange

Create a currency exchange

Creates a new currency exchange object.

Body parameters

date string required
from_currency string required
to_currency string required
exchange_rate number required
for_buying boolean

Default: true

for_selling boolean

Default: true

Returns

Returns the newly created currency exchange object if the call succeeded.

POST /api/setup/currency-exchange
curl https://api.overplane.dev/api/setup/currency-exchange \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"date":"2024-01-15","from_currency":"USD","to_currency":"USD","exchange_rate":0}'
Response
{
  "id": "currency-exchange_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "date": "2024-01-15",
  "from_currency": "USD",
  "to_currency": "USD",
  "exchange_rate": 0,
  "for_buying": true,
  "for_selling": true
}
PATCH /api/setup/currency-exchange/{id}

Update a currency exchange

Updates the specified currency exchange 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 exchange to update.

Body parameters

date string
from_currency string
to_currency string
exchange_rate number
for_buying boolean

Default: true

for_selling boolean

Default: true

Returns

Returns the updated currency exchange object.

PATCH /api/setup/currency-exchange/{id}
curl https://api.overplane.dev/api/setup/currency-exchange/currency-exchange_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"date":"2024-01-15","from_currency":"USD"}'
Response
{
  "id": "currency-exchange_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "date": "2024-01-15",
  "from_currency": "USD",
  "to_currency": "USD",
  "exchange_rate": 0,
  "for_buying": true,
  "for_selling": true
}
DELETE /api/setup/currency-exchange/{id}

Delete a currency exchange

Permanently deletes a currency exchange. This cannot be undone.

Path parameters

id string required

The identifier of the currency exchange to delete.

Returns

Returns a confirmation that the currency exchange has been deleted.

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