/v2/conversions/{id}/split

POST

Returns a JSON structure of conversion split execute details.

The API responses shown below are static. If you want to try out the API please login, or register for an API key

API parameters

Required
NameInTypeDescription
X-Auth-Token header string Authentication token.
id path string ID of the conversion that is being cancelled
amount formData string The amount at which to split this conversion.
Optional
NameInTypeDescription
on_behalf_of formData string Contact UUID.
curl -X POST  --header "X-Auth-Token: XXXX-XXXXX-XXXX"  https://devapi.currencycloud.com/v2/conversions/{id}/split

Response

{
    "parent_conversion": {
        "id": "1d98fa3d-e27b-459f-890e-069974cded61",
        "short_reference": "20180810-YCVNGM",
        "sell_amount": "70.93",
        "sell_currency": "GBP",
        "buy_amount": "100.00",
        "buy_currency": "USD",
        "settlement_date": "2018-08-13T15:30:00+00:00",
        "conversion_date": "2018-08-13T00:00:00+00:00",
        "status": "awaiting_funds"
    },
    "child_conversion": {
        "id": "59f793ca-273d-4bfb-b738-2c5f99cb05ab",
        "short_reference": "20180810-HYQRML",
        "sell_amount": "35.46",
        "sell_currency": "GBP",
        "buy_amount": "50.00",
        "buy_currency": "USD",
        "settlement_date": "2018-08-13T15:30:00+00:00",
        "conversion_date": "2018-08-13T00:00:00+00:00",
        "status": "awaiting_funds"
    }
}
Error Codes
HTTP Status Code Description Params
400 id_is_not_valid_uuid id should be in UUID format
on_behalf_of_self You cannot act on behalf of your own Contact
contact_not_found Contact was not found for this id
invalid_extra_parameters Invalid extra parameters extra_parameter { "parameters" => "extra_parameter" }
401 invalid_supplied_credentials Authentication failed with the supplied credentials
429 too_many_requests Too many requests have been made to the api. Please refer to the Developer Center for more information
500 internal_server_error Internal server error
503 service_unavailable Service is temporary unavailable
Was this page helpful?
Yes
No