Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Basic authentication using the partner API keys from https://console.grainfinance.co/keys

Headers

X-Customer-IP
string<IPv4>
required

The IPv4 address of the browser from which the customer contacts your platform.
example: 192.158.1.38

Pattern: ((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}

Body

application/json

The payload required in order to accept a conversion proposal.

conversionProposalId
string<uuid>
required

The id of the conversion proposal to accept.

Pattern: [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}
Example:

"8173b9a7-ee61-413e-b9e3-7c04b2a067c5"

toCurrencyAmount
number<double>

the amount to transfer in the toCurrency. If amount was not specified on quote, it should be specified on Accept.

Example:

1560

extraFields
object

Additional fields that provide further details about the transaction. These fields should be specified as a valid JSON object.

Example:

Response

Conversion Accepted

The response of a conversion action. Includes the reference to the relevant objects.

id
string<uuid>
required

The id of the created conversion

Pattern: [0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}
Example:

"4d78ac65-2c3f-47e2-8bf3-3f76124e9d27"