Airwallex logo
Airwallex logoAirwallex logo

Conversion Amendments

Copy for LLMView as Markdown

The Amendments resource provides the capability to make changes to existing conversions. Right now, the only supported amendment type is a full cancellation.

Endpoints
POST /api/v1/conversion_amendments/quote
POST /api/v1/conversion_amendments/create
GET /api/v1/conversion_amendments/{conversion_amendment_id}
GET /api/v1/conversion_amendments

Create an amendment quote

POST /api/v1/conversion_amendments/quote

Create an amendment quote on a booked but unsettled conversion. Get an indicative quote for the charge fee.

Request body
conversion_idrequiredstring

Unique identifier of the conversion to be amended.

request_idrequiredstring

Client-generated idempotency key.

typerequiredstring

Defines the type of amendment to be created. Only CANCEL is supported.

  • CANCEL - full cancellation of the original conversion
charge_currencystring

Currency charged on the delta that arises with the amendment. Only the currencies from the original conversion are allowed. Default will be set to the non-fixed side of the original conversion.

metadataobject

Persisted client-supplied metadata. A metadata JSON object with a maximum of 10 key-value pairs (each key and value must be less than 255 characters).

Response body - 200 OK
chargesarray

Represents the indicative financial adjustment resulting from the amendment.

charges.amountnumber

The amount of the financial adjustment (cancellation delta). Contact your account manager for settlement timing and configuration options.

charges.awx_ratenumber

The rate at which Airwallex executed the amendment (with Airwallex's liquidity provider partners).

charges.client_ratenumber

The rate at which the client is being billed for the amendment (inherited from the client’s existing conversion rate configuration).

charges.currencystring

The currency of the financial adjustment. This is always the non-fixed side of the original conversion.

charges.currency_pairstring

The currency pair associated with awx_rate and client_rate.

charges.typestring

Type of charge applied. FEE and CREDIT supported.

conversion_idstring

Airwallex echoes the unique identifier of the conversion being amended.

metadataobject

Airwallex echoes any client-supplied metadata.

request_idstring

Airwallex echoes the request’s idempotency key.

short_reference_idstring

Shortened transaction unique identifier for ease of use within Web GUI and with Airwallex support.

typestring

Defines the type of amendment to be created. Only CANCEL is supported.

  • CANCEL - full cancellation of the original conversion
Errors
Error statusDescription
400

Possible errors: account_not_authorized, does_not_exist, field_required, invalid_status_for_operation, invalid_charge_currency

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

POST /api/v1/conversion_amendments/quote
$curl --request POST \
> --url 'https://api-demo.airwallex.com/api/v1/conversion_amendments/quote' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "charge_currency": "USD",
> "conversion_id": "a74317c0-ed25-4e6e-82b2-82baa5cd9c20",
> "metadata": {
> "reason": "rejected_trade_attempt_968059869"
> },
> "request_id": "a08c0f2f-3f26-4443-b5df-fad15582eb94",
> "type": "CANCEL"
>}'
Response (200 OK)
1{
2 "charges": [
3 {
4 "amount": 1.36,
5 "awx_rate": 1.383429,
6 "client_rate": 1.390346,
7 "currency": "USD",
8 "currency_pair": "GBPUSD",
9 "type": "FEE"
10 }
11 ],
12 "conversion_id": "a74317c0-ed25-4e6e-82b2-82baa5cd9c20",
13 "metadata": {
14 "reason": "rejected_trade_attempt_968059869"
15 },
16 "request_id": "a08c0f2f-3f26-4443-b5df-fad15582eb94",
17 "short_reference_id": "C220407-AF3GJ9F",
18 "type": "CANCEL"
19}
Was this section helpful?

Create an amendment

POST /api/v1/conversion_amendments/create

Create an amendment on a booked but unsettled conversion.

Request body
conversion_idrequiredstring

Unique identifier of the conversion to be amended.

request_idrequiredstring

Client-generated idempotency key.

typerequiredstring

Defines the type of amendment to be created. Only CANCEL is supported.

  • CANCEL - full cancellation of the original conversion
charge_currencystring

Currency charged on the delta that arises with the amendment. Only the currencies from the original conversion are allowed. Default will be set to the non-fixed side of the original conversion.

metadataobject

Persisted client-supplied metadata. A metadata JSON object with a maximum of 10 key-value pairs (each key and value must be less than 255 characters).

Response body - 201 Created
amendment_idstring

Airwallex-generated unique identifier of the amendment.

chargesarray

Represents the indicative financial adjustment resulting from the amendment.

charges.amountnumber

The amount of the financial adjustment (cancellation delta). Contact your account manager for settlement timing and configuration options.

charges.awx_ratenumber

The rate at which Airwallex executed the amendment (with Airwallex's liquidity provider partners).

charges.client_ratenumber

The rate at which the client is being billed for the amendment (inherited from the client’s existing conversion rate configuration).

charges.currencystring

The currency of the financial adjustment. This is always the non-fixed side of the original conversion.

charges.currency_pairstring

The currency pair associated with awx_rate and client_rate.

charges.typestring

Type of charge applied. FEE and CREDIT supported.

conversion_idstring

Airwallex echoes the unique identifier of the conversion being amended.

created_atstring

The time at which the amendment was created (follows the same format as the rest of Airwallex’s APIs).

metadataobject

Airwallex echoes any client-supplied metadata.

request_idstring

Airwallex echoes the request’s idempotency key.

short_reference_idstring

Shortened transaction unique identifier for ease of use within Web GUI and with Airwallex support.

typestring

Defines the type of amendment to be created. Only CANCEL is supported.

  • CANCEL - full cancellation of the original conversion
updated_atstring

The time at which the amendment was last updated (follows the same format as the rest of Airwallex’s APIs).

Errors
Error statusDescription
400

Possible errors: account_not_authorized, does_not_exist, field_required, invalid_status_for_operation, invalid_charge_currency

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

POST /api/v1/conversion_amendments/create
$curl --request POST \
> --url 'https://api-demo.airwallex.com/api/v1/conversion_amendments/create' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "charge_currency": "USD",
> "conversion_id": "a74317c0-ed25-4e6e-82b2-82baa5cd9c20",
> "metadata": {
> "reason": "rejected_trade_attempt_968059869"
> },
> "request_id": "a08c0f2f-3f26-4443-b5df-fad15582eb94",
> "type": "CANCEL"
>}'
Response (201 Created)
1{
2 "amendment_id": "9593ca22-8933-4585-9a15-078c8ce654ad",
3 "charges": [
4 {
5 "amount": 1.36,
6 "awx_rate": 1.383429,
7 "client_rate": 1.390346,
8 "currency": "USD",
9 "currency_pair": "GBPUSD",
10 "type": "FEE"
11 }
12 ],
13 "conversion_id": "a74317c0-ed25-4e6e-82b2-82baa5cd9c20",
14 "created_at": "2021-07-14T06:09:39+0000",
15 "metadata": {
16 "reason": "rejected_trade_attempt_968059869"
17 },
18 "request_id": "a08c0f2f-3f26-4443-b5df-fad15582eb94",
19 "short_reference_id": "C220407-AF3GJ9F",
20 "type": "CANCEL",
21 "updated_at": "2021-07-14T06:09:39+0000"
22}
Was this section helpful?

Retrieve an amendment

GET /api/v1/conversion_amendments/{conversion_amendment_id}

Retrieve the details of a specific amendment using the amendment unique identifier.

Parameters
conversion_amendment_idrequiredstring

Unique identifier of the amendment.

Response body - 200 OK
amendment_idstring

Airwallex-generated unique identifier of the amendment.

chargesarray

Represents the indicative financial adjustment resulting from the amendment.

charges.amountnumber

The amount of the financial adjustment (cancellation delta). Contact your account manager for settlement timing and configuration options.

charges.awx_ratenumber

The rate at which Airwallex executed the amendment (with Airwallex's liquidity provider partners).

charges.client_ratenumber

The rate at which the client is being billed for the amendment (inherited from the client’s existing conversion rate configuration).

charges.currencystring

The currency of the financial adjustment. This is always the non-fixed side of the original conversion.

charges.currency_pairstring

The currency pair associated with awx_rate and client_rate.

charges.typestring

Type of charge applied. FEE and CREDIT supported.

conversion_idstring

Airwallex echoes the unique identifier of the conversion being amended.

created_atstring

The time at which the amendment was created (follows the same format as the rest of Airwallex’s APIs).

metadataobject

Airwallex echoes any client-supplied metadata.

request_idstring

Airwallex echoes the request’s idempotency key.

short_reference_idstring

Shortened transaction unique identifier for ease of use within Web GUI and with Airwallex support.

typestring

Defines the type of amendment to be created. Only CANCEL is supported.

  • CANCEL - full cancellation of the original conversion
updated_atstring

The time at which the amendment was last updated (follows the same format as the rest of Airwallex’s APIs).

Errors
Error statusDescription
400

Possible errors: account_not_authorized, does_not_exist, field_required, invalid_status_for_operation

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

GET /api/v1/conversion_amendments/{conversion_amendment_id}
$curl --request GET \
> --url 'https://api-demo.airwallex.com/api/v1/conversion_amendments/conversion_amendment_id' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "amendment_id": "9593ca22-8933-4585-9a15-078c8ce654ad",
3 "charges": [
4 {
5 "amount": 1.36,
6 "awx_rate": 1.383429,
7 "client_rate": 1.390346,
8 "currency": "USD",
9 "currency_pair": "GBPUSD",
10 "type": "FEE"
11 }
12 ],
13 "conversion_id": "a74317c0-ed25-4e6e-82b2-82baa5cd9c20",
14 "created_at": "2021-07-14T06:09:39+0000",
15 "metadata": {
16 "reason": "rejected_trade_attempt_968059869"
17 },
18 "request_id": "a08c0f2f-3f26-4443-b5df-fad15582eb94",
19 "short_reference_id": "C220407-AF3GJ9F",
20 "type": "CANCEL",
21 "updated_at": "2021-07-14T06:09:39+0000"
22}
Was this section helpful?

List all amendments

GET /api/v1/conversion_amendments

Retrieve all amendments associated with a conversion unique identifier. (Right now, since only full cancellations are supported, a conversion will only have up to 1 associated amendment.)

Parameters
conversion_idrequiredstring

Unique identifier of the conversion.

Response body - 200 OK
has_moreboolean

A flag which identifies whether there are more results.

itemsarray

Paged results.

items.amendment_idstring

Airwallex-generated unique identifier of the amendment.

items.chargesarray

Represents the indicative financial adjustment resulting from the amendment.

items.charges.amountnumber

The amount of the financial adjustment (cancellation delta). Contact your account manager for settlement timing and configuration options.

items.charges.awx_ratenumber

The rate at which Airwallex executed the amendment (with Airwallex's liquidity provider partners).

items.charges.client_ratenumber

The rate at which the client is being billed for the amendment (inherited from the client’s existing conversion rate configuration).

items.charges.currencystring

The currency of the financial adjustment. This is always the non-fixed side of the original conversion.

items.charges.currency_pairstring

The currency pair associated with awx_rate and client_rate.

items.charges.typestring

Type of charge applied. FEE and CREDIT supported.

items.conversion_idstring

Airwallex echoes the unique identifier of the conversion being amended.

items.created_atstring

The time at which the amendment was created (follows the same format as the rest of Airwallex’s APIs).

items.metadataobject

Airwallex echoes any client-supplied metadata.

items.request_idstring

Airwallex echoes the request’s idempotency key.

items.short_reference_idstring

Shortened transaction unique identifier for ease of use within Web GUI and with Airwallex support.

items.typestring

Defines the type of amendment to be created. Only CANCEL is supported.

  • CANCEL - full cancellation of the original conversion
items.updated_atstring

The time at which the amendment was last updated (follows the same format as the rest of Airwallex’s APIs).

Errors
Error statusDescription
400

Possible errors: account_not_authorized, does_not_exist, field_required, invalid_status_for_operation

401

Possible errors: credentials_invalid, credentials_expired

429

Too many requests

500

Service unavailable

GET /api/v1/conversion_amendments
$curl --request GET \
> --url 'https://api-demo.airwallex.com/api/v1/conversion_amendments' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "has_more": false,
3 "items": [
4 {
5 "amendment_id": "9593ca22-8933-4585-9a15-078c8ce654ad",
6 "charges": [
7 {
8 "amount": 1.36,
9 "awx_rate": 1.383429,
10 "client_rate": 1.390346,
11 "currency": "USD",
12 "currency_pair": "GBPUSD",
13 "type": "FEE"
14 }
15 ],
16 "conversion_id": "a74317c0-ed25-4e6e-82b2-82baa5cd9c20",
17 "created_at": "2021-07-14T06:09:39+0000",
18 "metadata": {
19 "reason": "rejected_trade_attempt_968059869"
20 },
21 "request_id": "a08c0f2f-3f26-4443-b5df-fad15582eb94",
22 "short_reference_id": "C220407-AF3GJ9F",
23 "type": "CANCEL",
24 "updated_at": "2021-07-14T06:09:39+0000"
25 }
26 ]
27}
Was this section helpful?